Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceContainerNameItem.cs / 3 / EntityDataSourceContainerNameItem.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System.Data.Metadata.Edm; using System.Diagnostics; namespace System.Web.UI.Design.WebControls { internal class EntityDataSourceContainerNameItem : 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 EntityContainer _entityContainer; // used when we have a real EntityContainer backing this item private readonly string _unknownContainerName; // used when we have an unknown DefaultContainerName that we still want to include in the list internal EntityDataSourceContainerNameItem(EntityContainer entityContainer) { Debug.Assert(entityContainer != null, "null entityContainer"); _entityContainer = entityContainer; } internal EntityDataSourceContainerNameItem(string unknownContainerName) { Debug.Assert(!String.IsNullOrEmpty(unknownContainerName), "null or empty unknownContainerName"); _unknownContainerName = unknownContainerName; } internal string EntityContainerName { get { if (_entityContainer != null) { return _entityContainer.Name; } else { return _unknownContainerName; } } } internal EntityContainer EntityContainer { get { // may be null if this represents an unknown container return _entityContainer; } } public override string ToString() { return this.EntityContainerName; } int IComparable .CompareTo(EntityDataSourceContainerNameItem other) { return (String.Compare(this.EntityContainerName, other.EntityContainerName, 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; using System.Diagnostics; namespace System.Web.UI.Design.WebControls { internal class EntityDataSourceContainerNameItem : 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 EntityContainer _entityContainer; // used when we have a real EntityContainer backing this item private readonly string _unknownContainerName; // used when we have an unknown DefaultContainerName that we still want to include in the list internal EntityDataSourceContainerNameItem(EntityContainer entityContainer) { Debug.Assert(entityContainer != null, "null entityContainer"); _entityContainer = entityContainer; } internal EntityDataSourceContainerNameItem(string unknownContainerName) { Debug.Assert(!String.IsNullOrEmpty(unknownContainerName), "null or empty unknownContainerName"); _unknownContainerName = unknownContainerName; } internal string EntityContainerName { get { if (_entityContainer != null) { return _entityContainer.Name; } else { return _unknownContainerName; } } } internal EntityContainer EntityContainer { get { // may be null if this represents an unknown container return _entityContainer; } } public override string ToString() { return this.EntityContainerName; } int IComparable .CompareTo(EntityDataSourceContainerNameItem other) { return (String.Compare(this.EntityContainerName, other.EntityContainerName, 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
- InternalRelationshipCollection.cs
- COM2ComponentEditor.cs
- ToolStripPanel.cs
- ResourceProviderFactory.cs
- SQLDoubleStorage.cs
- TableLayoutPanelCellPosition.cs
- MarkupExtensionSerializer.cs
- MarkupCompilePass2.cs
- XmlEnumAttribute.cs
- AnnotationDocumentPaginator.cs
- DateTimeOffset.cs
- TransportContext.cs
- ExceptionTrace.cs
- RSAProtectedConfigurationProvider.cs
- RijndaelManagedTransform.cs
- FrameworkContentElement.cs
- AssemblyBuilder.cs
- DiagnosticTraceSource.cs
- DocumentViewer.cs
- FontFamily.cs
- IssuedTokenClientBehaviorsElement.cs
- OpenTypeLayoutCache.cs
- PeerInvitationResponse.cs
- OdbcHandle.cs
- VersionPair.cs
- Page.cs
- CorrelationHandle.cs
- AQNBuilder.cs
- SqlComparer.cs
- LocalizationParserHooks.cs
- DefaultValueAttribute.cs
- PerformanceCounterTraceRecord.cs
- ReadOnlyObservableCollection.cs
- TraceSection.cs
- ScrollEvent.cs
- LeafCellTreeNode.cs
- DataFieldCollectionEditor.cs
- CodeNamespace.cs
- DiscoveryVersionConverter.cs
- CompositionAdorner.cs
- TemplatedAdorner.cs
- ConnectionProviderAttribute.cs
- GenerateScriptTypeAttribute.cs
- ToolTipAutomationPeer.cs
- Range.cs
- SchemaCollectionCompiler.cs
- ObjectReferenceStack.cs
- DirectoryNotFoundException.cs
- UrlMapping.cs
- HttpHandlersSection.cs
- RunWorkerCompletedEventArgs.cs
- SeekStoryboard.cs
- XmlILCommand.cs
- MessageDispatch.cs
- XPathParser.cs
- ProtocolsConfiguration.cs
- ColorConvertedBitmap.cs
- SignatureTargetIdManager.cs
- ExtensionSimplifierMarkupObject.cs
- SocketAddress.cs
- EndOfStreamException.cs
- ExtendedProtectionPolicy.cs
- MemberPath.cs
- EdmType.cs
- ViewEvent.cs
- QuaternionConverter.cs
- TraceFilter.cs
- IisTraceListener.cs
- XmlEnumAttribute.cs
- TextSelectionHelper.cs
- RegexMatch.cs
- NotifyInputEventArgs.cs
- CookielessHelper.cs
- InvalidContentTypeException.cs
- FigureHelper.cs
- CompilerCollection.cs
- NonDualMessageSecurityOverHttp.cs
- DataGridViewTopRowAccessibleObject.cs
- WebPartRestoreVerb.cs
- Base64Encoding.cs
- XmlQueryType.cs
- ModifierKeysConverter.cs
- COM2IProvidePropertyBuilderHandler.cs
- WeakRefEnumerator.cs
- CompoundFileReference.cs
- ActivityWithResultWrapper.cs
- PropertyEmitterBase.cs
- MenuBase.cs
- LZCodec.cs
- CmsInterop.cs
- ProtocolsConfiguration.cs
- ConsoleKeyInfo.cs
- QueryCacheManager.cs
- TypeInfo.cs
- Keywords.cs
- IndexedString.cs
- NominalTypeEliminator.cs
- StateDesigner.Helpers.cs
- SqlRetyper.cs
- PageHandlerFactory.cs