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
- OutputCacheSettingsSection.cs
- DeviceFilterEditorDialog.cs
- Socket.cs
- GAC.cs
- CompiledQueryCacheKey.cs
- GridItemCollection.cs
- ConditionalWeakTable.cs
- MouseOverProperty.cs
- InstanceLockedException.cs
- NameTable.cs
- Geometry.cs
- ObfuscateAssemblyAttribute.cs
- StorageFunctionMapping.cs
- AttributeCallbackBuilder.cs
- ConnectionsZone.cs
- GlyphCache.cs
- ContentType.cs
- ResXDataNode.cs
- SmiEventStream.cs
- ClientSponsor.cs
- SrgsElementList.cs
- VectorConverter.cs
- WorkflowPageSetupDialog.cs
- ToolStripDropDownItemDesigner.cs
- DocumentOrderQuery.cs
- PipelineModuleStepContainer.cs
- StandardOleMarshalObject.cs
- SpellerHighlightLayer.cs
- EntityDataSourceMemberPath.cs
- ZoneLinkButton.cs
- LoginView.cs
- WpfPayload.cs
- ApplicationSettingsBase.cs
- ClientCultureInfo.cs
- UnsignedPublishLicense.cs
- UserValidatedEventArgs.cs
- ControlCommandSet.cs
- PageParserFilter.cs
- wgx_sdk_version.cs
- Route.cs
- TimeoutConverter.cs
- RegexFCD.cs
- PropertyToken.cs
- DefaultBinder.cs
- PageRequestManager.cs
- EncoderExceptionFallback.cs
- CompilationLock.cs
- AlphaSortedEnumConverter.cs
- ThreadExceptionEvent.cs
- SrgsSemanticInterpretationTag.cs
- PriorityQueue.cs
- BufferedGraphics.cs
- PriorityQueue.cs
- TraceContextEventArgs.cs
- HandlerBase.cs
- AnimatedTypeHelpers.cs
- MdImport.cs
- WebPartEditVerb.cs
- ToolStripActionList.cs
- OdbcInfoMessageEvent.cs
- TabControlDesigner.cs
- HMACSHA256.cs
- ColorPalette.cs
- PrivilegedConfigurationManager.cs
- JsonWriter.cs
- CodeAssignStatement.cs
- StringReader.cs
- RegexStringValidatorAttribute.cs
- ValidatorCompatibilityHelper.cs
- CharacterMetricsDictionary.cs
- Math.cs
- XPathDocumentIterator.cs
- IERequestCache.cs
- ImportCatalogPart.cs
- TreeNodeCollection.cs
- URLEditor.cs
- FileVersion.cs
- DelegateArgumentReference.cs
- FillBehavior.cs
- ValidationContext.cs
- BitVector32.cs
- VisualBrush.cs
- BorderSidesEditor.cs
- MessageBuffer.cs
- MimeWriter.cs
- EventWaitHandle.cs
- DataStorage.cs
- CompositeFontParser.cs
- Thumb.cs
- WebPartConnection.cs
- SchemaMapping.cs
- AccessText.cs
- ProfileGroupSettingsCollection.cs
- LabelEditEvent.cs
- XmlWrappingReader.cs
- ViewPort3D.cs
- DefaultAutoFieldGenerator.cs
- DataBindingList.cs
- CrossSiteScriptingValidation.cs
- OdbcConnectionPoolProviderInfo.cs