Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceEntitySetNameItem.cs / 3 / 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
- FormCollection.cs
- SqlDependencyUtils.cs
- GenerateDerivedKeyRequest.cs
- Literal.cs
- ADRole.cs
- PositiveTimeSpanValidator.cs
- ValueOfAction.cs
- EditingCommands.cs
- PbrsForward.cs
- HyperLinkField.cs
- LoginViewDesigner.cs
- ToolStripItemCollection.cs
- InheritanceAttribute.cs
- Exceptions.cs
- GridViewRowCollection.cs
- X509Extension.cs
- x509utils.cs
- ElementInit.cs
- EventHandlerList.cs
- Trace.cs
- VScrollProperties.cs
- SimpleRecyclingCache.cs
- TaiwanCalendar.cs
- WinHttpWebProxyFinder.cs
- XmlIgnoreAttribute.cs
- DataConnectionHelper.cs
- IndicFontClient.cs
- ProviderConnectionPoint.cs
- TrueReadOnlyCollection.cs
- SetterBase.cs
- LiteralControl.cs
- FocusManager.cs
- DataPagerCommandEventArgs.cs
- SqlRecordBuffer.cs
- StringAnimationUsingKeyFrames.cs
- ItemPager.cs
- ScriptingProfileServiceSection.cs
- ConfigViewGenerator.cs
- ObjectStateManager.cs
- SelfSignedCertificate.cs
- WithParamAction.cs
- CompiledQueryCacheEntry.cs
- PathSegment.cs
- CollectionViewGroupRoot.cs
- EnumConverter.cs
- DataSourceControl.cs
- OptimizedTemplateContentHelper.cs
- NumericExpr.cs
- EnumerableCollectionView.cs
- InvalidCastException.cs
- MsmqAuthenticationMode.cs
- EnumCodeDomSerializer.cs
- DesignerAttributeInfo.cs
- ColorPalette.cs
- AssemblyHash.cs
- ResourceDictionary.cs
- Win32MouseDevice.cs
- DependencyObjectPropertyDescriptor.cs
- SystemInformation.cs
- MaskedTextBox.cs
- XmlSchemaExternal.cs
- HandlerFactoryWrapper.cs
- DesignerActionHeaderItem.cs
- _NetRes.cs
- EncryptedKeyIdentifierClause.cs
- SafeNativeMethods.cs
- DbConnectionOptions.cs
- PagerSettings.cs
- CqlParserHelpers.cs
- LinqDataView.cs
- HScrollProperties.cs
- ResourceManager.cs
- CachedPathData.cs
- SortKey.cs
- FixedSOMTableRow.cs
- WebProxyScriptElement.cs
- SchemaLookupTable.cs
- ResourceDefaultValueAttribute.cs
- OleDbWrapper.cs
- HtmlInputControl.cs
- TextReader.cs
- cookiecollection.cs
- CompiledXpathExpr.cs
- MetadataFile.cs
- RectAnimation.cs
- InstanceLockedException.cs
- XmlNode.cs
- ValidationSummary.cs
- ValueTypeFixupInfo.cs
- UserControl.cs
- ListItemCollection.cs
- FileUtil.cs
- PageCodeDomTreeGenerator.cs
- WebContentFormatHelper.cs
- ProcessActivityTreeOptions.cs
- ProviderConnectionPoint.cs
- XamlSerializer.cs
- BufferedGraphics.cs
- DiffuseMaterial.cs
- ContainerControl.cs