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
- ScriptingProfileServiceSection.cs
- Message.cs
- HtmlSelect.cs
- PackageDigitalSignatureManager.cs
- LeafCellTreeNode.cs
- RelationshipEnd.cs
- XmlSchemaSimpleContentExtension.cs
- AppDomain.cs
- ModuleBuilder.cs
- ImageMap.cs
- LineSegment.cs
- XmlnsDictionary.cs
- ManualResetEvent.cs
- FieldTemplateFactory.cs
- XmlNodeChangedEventManager.cs
- HMAC.cs
- MarkupObject.cs
- Misc.cs
- DynamicRendererThreadManager.cs
- ComAwareEventInfo.cs
- ExecutionEngineException.cs
- SafeBitVector32.cs
- TreeNodeBinding.cs
- AttachedPropertyBrowsableAttribute.cs
- WebControlToolBoxItem.cs
- connectionpool.cs
- DriveNotFoundException.cs
- WindowsComboBox.cs
- KeyBinding.cs
- SqlAliasesReferenced.cs
- XmlReflectionMember.cs
- EnumValAlphaComparer.cs
- TextParagraphProperties.cs
- SamlDoNotCacheCondition.cs
- GroupBox.cs
- SoapConverter.cs
- AuthenticationService.cs
- CacheManager.cs
- DBSqlParserTable.cs
- ScaleTransform.cs
- EndPoint.cs
- WeakReferenceList.cs
- FormViewDeletedEventArgs.cs
- DocumentApplication.cs
- XmlSchemaObject.cs
- TemplateXamlParser.cs
- SqlDataSourceEnumerator.cs
- DefaultValidator.cs
- UnsafeNativeMethods.cs
- AddInPipelineAttributes.cs
- RSAOAEPKeyExchangeFormatter.cs
- StateInitialization.cs
- SqlCacheDependencySection.cs
- XmlResolver.cs
- DNS.cs
- Lease.cs
- ExternalException.cs
- QueryCursorEventArgs.cs
- HeaderLabel.cs
- TypeConverterHelper.cs
- LicFileLicenseProvider.cs
- InputMethodStateChangeEventArgs.cs
- SimplePropertyEntry.cs
- AlgoModule.cs
- HttpChannelListener.cs
- QueryInterceptorAttribute.cs
- WrappedOptions.cs
- Bookmark.cs
- XmlEntityReference.cs
- ZipIOExtraFieldZip64Element.cs
- WebPartZoneBase.cs
- ThreadNeutralSemaphore.cs
- WizardStepBase.cs
- DefaultObjectMappingItemCollection.cs
- Authorization.cs
- ClientTarget.cs
- ResXDataNode.cs
- WebPartManager.cs
- HtmlElementCollection.cs
- XhtmlBasicPhoneCallAdapter.cs
- HtmlTableRowCollection.cs
- DataGridViewImageCell.cs
- DataContractJsonSerializerOperationFormatter.cs
- DataBinding.cs
- ConstructorArgumentAttribute.cs
- ReliabilityContractAttribute.cs
- PageAsyncTaskManager.cs
- DefaultTextStoreTextComposition.cs
- RegularExpressionValidator.cs
- ToolStripRenderEventArgs.cs
- AssociationSetEnd.cs
- WorkflowRuntime.cs
- SamlDelegatingWriter.cs
- cookiecontainer.cs
- SerializationSectionGroup.cs
- LinqDataView.cs
- ColumnClickEvent.cs
- QueryCacheEntry.cs
- PenThreadPool.cs
- ExpressionVisitor.cs