Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceEntitySetNameItem.cs / 1305376 / EntityDataSourceEntitySetNameItem.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//-----------------------------------------------------------------------------
using System.Data.Metadata.Edm;
namespace System.Web.UI.Design.WebControls
{
internal class EntityDataSourceEntitySetNameItem : IComparable
{
// Only one of the following should be set. This is enforced through the constructors and the fact that these fields are readonly.
private readonly EntitySet _entitySet; // used when we have a real EntitySet backing this item
private readonly string _unknownEntitySetName; // used when we have an unknown EntitySetName that we still want to include in the list
internal EntityDataSourceEntitySetNameItem(EntitySet entitySet)
{
_entitySet = entitySet;
}
internal EntityDataSourceEntitySetNameItem(string unknownEntitySetName)
{
_unknownEntitySetName = unknownEntitySetName;
}
internal string EntitySetName
{
get
{
if (_entitySet != null)
{
return _entitySet.Name;
}
else
{
return _unknownEntitySetName;
}
}
}
internal EntitySet EntitySet
{
get
{
return _entitySet;
}
}
public override string ToString()
{
return EntitySetName;
}
int IComparable.CompareTo(EntityDataSourceEntitySetNameItem other)
{
return (String.Compare(this.EntitySetName, other.EntitySetName, StringComparison.OrdinalIgnoreCase));
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//-----------------------------------------------------------------------------
using System.Data.Metadata.Edm;
namespace System.Web.UI.Design.WebControls
{
internal class EntityDataSourceEntitySetNameItem : IComparable
{
// Only one of the following should be set. This is enforced through the constructors and the fact that these fields are readonly.
private readonly EntitySet _entitySet; // used when we have a real EntitySet backing this item
private readonly string _unknownEntitySetName; // used when we have an unknown EntitySetName that we still want to include in the list
internal EntityDataSourceEntitySetNameItem(EntitySet entitySet)
{
_entitySet = entitySet;
}
internal EntityDataSourceEntitySetNameItem(string unknownEntitySetName)
{
_unknownEntitySetName = unknownEntitySetName;
}
internal string EntitySetName
{
get
{
if (_entitySet != null)
{
return _entitySet.Name;
}
else
{
return _unknownEntitySetName;
}
}
}
internal EntitySet EntitySet
{
get
{
return _entitySet;
}
}
public override string ToString()
{
return EntitySetName;
}
int IComparable.CompareTo(EntityDataSourceEntitySetNameItem other)
{
return (String.Compare(this.EntitySetName, other.EntitySetName, StringComparison.OrdinalIgnoreCase));
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlRewriteScalarSubqueries.cs
- Transform3DGroup.cs
- EncodedStreamFactory.cs
- TransformerConfigurationWizardBase.cs
- ControlPropertyNameConverter.cs
- ParameterCollection.cs
- CodeGenerator.cs
- ToolStripKeyboardHandlingService.cs
- translator.cs
- SymbolTable.cs
- SimpleRecyclingCache.cs
- KeyInterop.cs
- ListControlBuilder.cs
- BehaviorDragDropEventArgs.cs
- XmlILIndex.cs
- CompilerParameters.cs
- Block.cs
- Point.cs
- SiteMapNodeItem.cs
- ReadOnlyCollectionBase.cs
- SrgsToken.cs
- ProvideValueServiceProvider.cs
- InternalsVisibleToAttribute.cs
- CodeObject.cs
- HttpCachePolicyElement.cs
- ImageListUtils.cs
- InfiniteIntConverter.cs
- ProofTokenCryptoHandle.cs
- SmiEventSink_DeferedProcessing.cs
- DocComment.cs
- CurrentChangingEventArgs.cs
- CodeArrayIndexerExpression.cs
- CustomErrorCollection.cs
- GlyphRunDrawing.cs
- TextRangeBase.cs
- TimeIntervalCollection.cs
- AttachedPropertyBrowsableAttribute.cs
- DrawingContextWalker.cs
- DebugHandleTracker.cs
- BaseAutoFormat.cs
- WindowsScrollBarBits.cs
- x509utils.cs
- unitconverter.cs
- Focus.cs
- GridViewRow.cs
- IntSecurity.cs
- CodePageUtils.cs
- GACIdentityPermission.cs
- DbConnectionStringCommon.cs
- RecipientInfo.cs
- ObjectDataSourceMethodEventArgs.cs
- WindowsTab.cs
- DuplicateWaitObjectException.cs
- Highlights.cs
- xmlformatgeneratorstatics.cs
- XPathChildIterator.cs
- PageAsyncTaskManager.cs
- SamlConstants.cs
- SqlReferenceCollection.cs
- MsdtcClusterUtils.cs
- FigureParagraph.cs
- WebBrowserProgressChangedEventHandler.cs
- FullTextBreakpoint.cs
- AVElementHelper.cs
- SmtpDigestAuthenticationModule.cs
- DependencyObject.cs
- DbMetaDataFactory.cs
- CmsInterop.cs
- RequiredFieldValidator.cs
- EmissiveMaterial.cs
- WorkflowEnvironment.cs
- DefaultBinder.cs
- XmlResolver.cs
- Italic.cs
- ServiceHostFactory.cs
- SizeAnimationBase.cs
- ResourceIDHelper.cs
- __Error.cs
- DefaultValidator.cs
- FormViewRow.cs
- TimelineGroup.cs
- GenerateScriptTypeAttribute.cs
- ProviderIncompatibleException.cs
- ConfigurationValidatorBase.cs
- StubHelpers.cs
- RegisteredArrayDeclaration.cs
- EntityDataSourceViewSchema.cs
- NullableFloatSumAggregationOperator.cs
- WindowProviderWrapper.cs
- TypeLoadException.cs
- ColumnProvider.cs
- EmptyEnumerator.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- TextElementAutomationPeer.cs
- CreateUserWizard.cs
- XmlMapping.cs
- WindowsListViewItemCheckBox.cs
- AutoGeneratedField.cs
- XmlNamespaceManager.cs
- ClientConvert.cs