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
- StructuralCache.cs
- ToggleProviderWrapper.cs
- AutoResetEvent.cs
- JulianCalendar.cs
- TableDetailsRow.cs
- CompilerError.cs
- QilStrConcat.cs
- ImmutablePropertyDescriptorGridEntry.cs
- ConfigurationLocationCollection.cs
- CompositeDataBoundControl.cs
- TokenFactoryFactory.cs
- AnnotationResourceCollection.cs
- XPathAxisIterator.cs
- HealthMonitoringSectionHelper.cs
- ObjectQueryState.cs
- Avt.cs
- Attributes.cs
- IriParsingElement.cs
- TransactionInformation.cs
- TextMessageEncodingElement.cs
- Update.cs
- CookieParameter.cs
- SqlBulkCopy.cs
- QuaternionKeyFrameCollection.cs
- CompilationLock.cs
- UnsafeNativeMethods.cs
- DataGridViewSelectedCellCollection.cs
- CollectionContainer.cs
- KeyFrames.cs
- GeneralTransform2DTo3D.cs
- Operators.cs
- DataGridViewRowPrePaintEventArgs.cs
- _NtlmClient.cs
- ErrorInfoXmlDocument.cs
- SqlBuilder.cs
- PermissionRequestEvidence.cs
- MultiPartWriter.cs
- MsmqQueue.cs
- Int16AnimationUsingKeyFrames.cs
- WpfXamlType.cs
- PathGeometry.cs
- XPathSelectionIterator.cs
- VisualBasicSettingsHandler.cs
- CodeIdentifier.cs
- Label.cs
- SendMailErrorEventArgs.cs
- WindowsAuthenticationEventArgs.cs
- IIS7ConfigurationLoader.cs
- SlotInfo.cs
- HttpHandlerAction.cs
- ActivationServices.cs
- RelationshipNavigation.cs
- HashRepartitionEnumerator.cs
- AppDomainManager.cs
- WindowsNonControl.cs
- ListenerSingletonConnectionReader.cs
- MetadataPropertyCollection.cs
- CaseInsensitiveOrdinalStringComparer.cs
- arabicshape.cs
- StrokeNodeOperations2.cs
- XmlSchemaObjectTable.cs
- Application.cs
- QilTypeChecker.cs
- CompilerLocalReference.cs
- DetailsViewCommandEventArgs.cs
- DesignerActionListCollection.cs
- DataGridViewIntLinkedList.cs
- ElementMarkupObject.cs
- MethodCallTranslator.cs
- PermissionAttributes.cs
- SiteMapProvider.cs
- TextSegment.cs
- SoapExtensionTypeElement.cs
- RoutedEventConverter.cs
- ButtonBaseAutomationPeer.cs
- HttpContextBase.cs
- WebServicesSection.cs
- ClonableStack.cs
- base64Transforms.cs
- Update.cs
- KoreanCalendar.cs
- RtType.cs
- PersonalizationState.cs
- WebBrowserNavigatingEventHandler.cs
- SettingsAttributeDictionary.cs
- GlyphInfoList.cs
- BoundField.cs
- PropertyPath.cs
- ButtonRenderer.cs
- Matrix3DStack.cs
- StreamReader.cs
- Padding.cs
- OleServicesContext.cs
- PrintController.cs
- FakeModelItemImpl.cs
- ListGeneralPage.cs
- TextRangeAdaptor.cs
- DynamicValidatorEventArgs.cs
- DependencyStoreSurrogate.cs
- StyleModeStack.cs