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
- QilIterator.cs
- TrackBar.cs
- SecUtil.cs
- DataObjectMethodAttribute.cs
- FastPropertyAccessor.cs
- BitmapEffectDrawingContent.cs
- JsonFormatGeneratorStatics.cs
- EncoderParameters.cs
- ObjectDataSourceStatusEventArgs.cs
- SslStreamSecurityUpgradeProvider.cs
- TypeExtensionSerializer.cs
- LingerOption.cs
- ZipFileInfo.cs
- DesignTimeParseData.cs
- DependencyObjectType.cs
- InitializationEventAttribute.cs
- GridViewDeletedEventArgs.cs
- List.cs
- EventWaitHandle.cs
- ArrayWithOffset.cs
- TrackBarDesigner.cs
- PackagingUtilities.cs
- WebEventTraceProvider.cs
- KeyInstance.cs
- DropDownHolder.cs
- TextEncodedRawTextWriter.cs
- ArrayElementGridEntry.cs
- InstanceDescriptor.cs
- KeyFrames.cs
- GraphicsState.cs
- AdornerPresentationContext.cs
- DiagnosticTraceSource.cs
- EmbeddedMailObject.cs
- TemplateColumn.cs
- Model3D.cs
- InputReport.cs
- Padding.cs
- RbTree.cs
- RequestCachePolicy.cs
- CellCreator.cs
- wgx_sdk_version.cs
- TokenBasedSet.cs
- AssemblyAttributesGoHere.cs
- SQLString.cs
- ToolBarOverflowPanel.cs
- TypeExtensionConverter.cs
- RealProxy.cs
- SqlCaseSimplifier.cs
- XmlDigitalSignatureProcessor.cs
- FlowDocument.cs
- DataGridViewTextBoxColumn.cs
- MethodBuilder.cs
- ConnectionManager.cs
- sqlstateclientmanager.cs
- DataRowCollection.cs
- TextParagraphCache.cs
- XmlSerializer.cs
- ArithmeticException.cs
- XsltFunctions.cs
- RawUIStateInputReport.cs
- Int16AnimationBase.cs
- PackageRelationshipCollection.cs
- DynamicObject.cs
- ConnectionPointGlyph.cs
- FontStretch.cs
- ExceptionUtil.cs
- InternalSafeNativeMethods.cs
- DataGridViewBindingCompleteEventArgs.cs
- DocumentViewer.cs
- SHA512.cs
- X509Certificate.cs
- WebPageTraceListener.cs
- DispatcherHookEventArgs.cs
- UrlMappingsSection.cs
- ThicknessAnimationBase.cs
- GeometryModel3D.cs
- ConfigXmlWhitespace.cs
- SecureStringHasher.cs
- HtmlContainerControl.cs
- ArgumentOutOfRangeException.cs
- GridViewColumnCollectionChangedEventArgs.cs
- ApplicationHost.cs
- TextParagraphCache.cs
- KernelTypeValidation.cs
- TreeNodeClickEventArgs.cs
- XmlNodeReader.cs
- DummyDataSource.cs
- ToolStripHighContrastRenderer.cs
- CollectionBuilder.cs
- ContentTextAutomationPeer.cs
- AdornerLayer.cs
- ServiceObjectContainer.cs
- VisualStyleInformation.cs
- InternalsVisibleToAttribute.cs
- TcpProcessProtocolHandler.cs
- CacheOutputQuery.cs
- ISessionStateStore.cs
- OleDbDataReader.cs
- DeploymentExceptionMapper.cs
- ParentUndoUnit.cs