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
- InvokePattern.cs
- SchemaName.cs
- PeerInvitationResponse.cs
- ListViewItemEventArgs.cs
- Validator.cs
- TemplateParser.cs
- ContentPresenter.cs
- SelectionChangedEventArgs.cs
- ImageButton.cs
- WebEventTraceProvider.cs
- SAPICategories.cs
- CustomErrorsSectionWrapper.cs
- SimpleExpression.cs
- GeneralTransform3D.cs
- SvcMapFileSerializer.cs
- SafeWaitHandle.cs
- TargetConverter.cs
- StaticResourceExtension.cs
- CallbackValidatorAttribute.cs
- DataGridViewImageColumn.cs
- WebMessageBodyStyleHelper.cs
- QilFactory.cs
- Point4D.cs
- XmlSchemaException.cs
- ForceCopyBuildProvider.cs
- ListItemParagraph.cs
- CodeNamespace.cs
- RealizedColumnsBlock.cs
- Internal.cs
- UrlPropertyAttribute.cs
- PartialList.cs
- MessageSecurityOverMsmq.cs
- TimerElapsedEvenArgs.cs
- RelationshipDetailsRow.cs
- DateTimeValueSerializerContext.cs
- CodeNamespace.cs
- ChangeTracker.cs
- GridViewUpdateEventArgs.cs
- PropertyTabChangedEvent.cs
- MimeReturn.cs
- Brush.cs
- ProxyGenerationError.cs
- CodeParameterDeclarationExpressionCollection.cs
- DuplicateMessageDetector.cs
- JoinCqlBlock.cs
- CommonDialog.cs
- WebPartConnectionsDisconnectVerb.cs
- OleAutBinder.cs
- HiddenFieldPageStatePersister.cs
- EntityDataSourceStatementEditor.cs
- XmlQuerySequence.cs
- Fx.cs
- KeyEventArgs.cs
- TypeUsage.cs
- CustomErrorCollection.cs
- RestClientProxyHandler.cs
- ImageCollectionEditor.cs
- Transform3D.cs
- SemaphoreFullException.cs
- SocketAddress.cs
- TypeHelper.cs
- Point3DCollectionValueSerializer.cs
- TypefaceMap.cs
- TableLayoutCellPaintEventArgs.cs
- StorageFunctionMapping.cs
- GeneralTransformCollection.cs
- CodeVariableDeclarationStatement.cs
- Transform.cs
- Section.cs
- ChameleonKey.cs
- HostedTransportConfigurationManager.cs
- HttpClientProtocol.cs
- CodeCastExpression.cs
- TemplateParser.cs
- WindowsAuthenticationEventArgs.cs
- SystemGatewayIPAddressInformation.cs
- TaskExceptionHolder.cs
- ModuleConfigurationInfo.cs
- SplitterCancelEvent.cs
- WSSecurityOneDotZeroReceiveSecurityHeader.cs
- GridSplitter.cs
- XmlDictionaryWriter.cs
- PrintDocument.cs
- TextTreeNode.cs
- OperationResponse.cs
- dataSvcMapFileLoader.cs
- PriorityBinding.cs
- DateTimeFormatInfoScanner.cs
- StandardOleMarshalObject.cs
- DataContractSerializerFaultFormatter.cs
- ISFTagAndGuidCache.cs
- diagnosticsswitches.cs
- EntityClientCacheKey.cs
- KeyValueSerializer.cs
- ObjectToModelValueConverter.cs
- Socket.cs
- IconHelper.cs
- UTF8Encoding.cs
- MemberInfoSerializationHolder.cs
- EventDescriptorCollection.cs