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
- XmlAutoDetectWriter.cs
- SingleSelectRootGridEntry.cs
- DoubleUtil.cs
- DateTimeOffset.cs
- ImmutableObjectAttribute.cs
- TrustLevelCollection.cs
- DecoderFallback.cs
- MergeEnumerator.cs
- TextBox.cs
- ExcCanonicalXml.cs
- SelectedDatesCollection.cs
- HistoryEventArgs.cs
- Rotation3DAnimation.cs
- XmlSubtreeReader.cs
- AutomationElementIdentifiers.cs
- OperationBehaviorAttribute.cs
- Stylesheet.cs
- SymmetricCryptoHandle.cs
- ScriptingSectionGroup.cs
- SystemWebCachingSectionGroup.cs
- rsa.cs
- TableParaClient.cs
- X509UI.cs
- FormViewDesigner.cs
- XmlSchemaInclude.cs
- Wildcard.cs
- SyndicationDeserializer.cs
- WsdlBuildProvider.cs
- OpenTypeCommon.cs
- EUCJPEncoding.cs
- Invariant.cs
- Popup.cs
- SamlSerializer.cs
- ActivityWithResultConverter.cs
- CookieHandler.cs
- SqlServices.cs
- ListViewUpdatedEventArgs.cs
- RSAOAEPKeyExchangeFormatter.cs
- Style.cs
- OperationFormatter.cs
- FastEncoder.cs
- DrawingDrawingContext.cs
- ActivityExecutorSurrogate.cs
- MemberPath.cs
- _NtlmClient.cs
- ServiceOperationWrapper.cs
- AttachedAnnotationChangedEventArgs.cs
- ConfigWriter.cs
- XamlFxTrace.cs
- OledbConnectionStringbuilder.cs
- ParallelTimeline.cs
- TailCallAnalyzer.cs
- ToolStripItemRenderEventArgs.cs
- BitmapMetadataBlob.cs
- ToolStripActionList.cs
- DetailsViewUpdateEventArgs.cs
- XPathParser.cs
- ExpressionNormalizer.cs
- BlockCollection.cs
- EqualityComparer.cs
- Base64Encoder.cs
- TimeoutConverter.cs
- AsnEncodedData.cs
- SchemaImporterExtensionsSection.cs
- CreateUserWizardStep.cs
- XamlReaderConstants.cs
- RTLAwareMessageBox.cs
- ClientFormsAuthenticationCredentials.cs
- ThaiBuddhistCalendar.cs
- ToolStripDropDownMenu.cs
- SoapTypeAttribute.cs
- WebPartUserCapability.cs
- BaseTransportHeaders.cs
- XamlParser.cs
- StyleModeStack.cs
- PerformanceCountersElement.cs
- _Events.cs
- ThreadStaticAttribute.cs
- WebPartConnectionsCancelEventArgs.cs
- DirectoryObjectSecurity.cs
- ResXResourceSet.cs
- DataBindingHandlerAttribute.cs
- NumberFormatter.cs
- KnownIds.cs
- WaitForChangedResult.cs
- TextFormattingConverter.cs
- sitestring.cs
- Duration.cs
- TabPageDesigner.cs
- DirectoryInfo.cs
- PointAnimationUsingKeyFrames.cs
- BitmapScalingModeValidation.cs
- CompoundFileStorageReference.cs
- DataTemplate.cs
- ConditionBrowserDialog.cs
- InfoCardRSACryptoProvider.cs
- xamlnodes.cs
- XpsS0ValidatingLoader.cs
- HostedHttpTransportManager.cs
- UdpReplyToBehavior.cs