Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceContainerNameItem.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PropertyChangedEventArgs.cs
- ProbeMatchesApril2005.cs
- PanelDesigner.cs
- _KerberosClient.cs
- SpecularMaterial.cs
- GlyphTypeface.cs
- HttpContext.cs
- PageHandlerFactory.cs
- NameSpaceExtractor.cs
- MediaCommands.cs
- PeerObject.cs
- COAUTHINFO.cs
- SqlInternalConnection.cs
- TextDecoration.cs
- XmlNodeComparer.cs
- ComponentEvent.cs
- NotFiniteNumberException.cs
- ProviderConnectionPointCollection.cs
- ToolStripManager.cs
- UnsafeNativeMethods.cs
- MSAAWinEventWrap.cs
- CodeLinePragma.cs
- ThemeConfigurationDialog.cs
- HttpDebugHandler.cs
- CompositeKey.cs
- ValidationErrorEventArgs.cs
- Span.cs
- DataColumnPropertyDescriptor.cs
- DataGridViewCellCollection.cs
- ObjectSet.cs
- SourceInterpreter.cs
- ConfigXmlReader.cs
- CompoundFileStreamReference.cs
- ObjectHandle.cs
- Encoder.cs
- HealthMonitoringSectionHelper.cs
- ScopeElement.cs
- ToolStripDropDown.cs
- DbConnectionPoolGroup.cs
- PartialCachingAttribute.cs
- MultipartContentParser.cs
- CodeConstructor.cs
- ReadContentAsBinaryHelper.cs
- WpfWebRequestHelper.cs
- baseaxisquery.cs
- FuncCompletionCallbackWrapper.cs
- ConfigurationElementCollection.cs
- BasePattern.cs
- HotCommands.cs
- DeflateStreamAsyncResult.cs
- UriWriter.cs
- TablePattern.cs
- SoapFormatterSinks.cs
- HttpClientCredentialType.cs
- ActivityCodeDomReferenceService.cs
- ChangePassword.cs
- MarkupCompilePass1.cs
- IPAddressCollection.cs
- CodeSubDirectoriesCollection.cs
- ValueChangedEventManager.cs
- BaseHashHelper.cs
- ConfigurationLoader.cs
- CrossContextChannel.cs
- ProxyAttribute.cs
- JapaneseCalendar.cs
- DataGridViewElement.cs
- XmlQueryTypeFactory.cs
- SystemFonts.cs
- ConnectionPointCookie.cs
- TextTreeUndoUnit.cs
- InternalUserCancelledException.cs
- Registry.cs
- VirtualPathUtility.cs
- ParserContext.cs
- ServiceOperationListItemList.cs
- ClientEventManager.cs
- EdmFunction.cs
- SQLByteStorage.cs
- ResourceDisplayNameAttribute.cs
- ThreadStateException.cs
- FtpCachePolicyElement.cs
- StateManagedCollection.cs
- EditorPartChrome.cs
- SamlDoNotCacheCondition.cs
- Control.cs
- ThrowHelper.cs
- MediaEntryAttribute.cs
- UICuesEvent.cs
- DbBuffer.cs
- CodeGroup.cs
- EffectiveValueEntry.cs
- XmlDataSourceNodeDescriptor.cs
- HtmlInputCheckBox.cs
- HostedHttpRequestAsyncResult.cs
- StyleSheetDesigner.cs
- OdbcPermission.cs
- Encoder.cs
- FlowDecisionLabelFeature.cs
- Part.cs
- ConfigurationManagerHelper.cs