Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceEntitySetNameItem.cs / 1305376 / 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
- TraversalRequest.cs
- WsdlBuildProvider.cs
- ThaiBuddhistCalendar.cs
- UxThemeWrapper.cs
- MembershipValidatePasswordEventArgs.cs
- PolyLineSegmentFigureLogic.cs
- InterleavedZipPartStream.cs
- TimeSpanMinutesConverter.cs
- TrustManagerPromptUI.cs
- PiiTraceSource.cs
- ZipIORawDataFileBlock.cs
- ModelTreeEnumerator.cs
- ResourceWriter.cs
- DesignTimeTemplateParser.cs
- FontWeights.cs
- UpdateDelegates.Generated.cs
- ConfigXmlElement.cs
- ExtensibleClassFactory.cs
- TcpAppDomainProtocolHandler.cs
- ValidationPropertyAttribute.cs
- XmlWriterTraceListener.cs
- ObjectView.cs
- SecurityElementBase.cs
- ButtonChrome.cs
- SynchronizationContext.cs
- User.cs
- DataGridHelper.cs
- BuilderInfo.cs
- RoleManagerSection.cs
- XhtmlBasicValidationSummaryAdapter.cs
- CalendarAutomationPeer.cs
- ListBoxItem.cs
- ListMarkerLine.cs
- TextTreeDeleteContentUndoUnit.cs
- SrgsSubset.cs
- MsmqIntegrationProcessProtocolHandler.cs
- InstanceLockQueryResult.cs
- IriParsingElement.cs
- ErrorRuntimeConfig.cs
- ReflectionTypeLoadException.cs
- BoolLiteral.cs
- SqlException.cs
- DataBindingCollection.cs
- RbTree.cs
- CompositeScriptReference.cs
- CoreSwitches.cs
- ExtensionFile.cs
- ImpersonationContext.cs
- MenuItem.cs
- BinaryParser.cs
- BaseDataBoundControl.cs
- ExpandedWrapper.cs
- ScriptingProfileServiceSection.cs
- RuntimeArgumentHandle.cs
- Tuple.cs
- InputQueueChannelAcceptor.cs
- PhysicalAddress.cs
- ConfigUtil.cs
- TimelineGroup.cs
- DescendentsWalker.cs
- BuildDependencySet.cs
- TargetControlTypeCache.cs
- InputBuffer.cs
- SchemaImporterExtensionElement.cs
- MemoryStream.cs
- SimpleBitVector32.cs
- EditorZone.cs
- LambdaCompiler.Statements.cs
- FileSystemEnumerable.cs
- basecomparevalidator.cs
- DefaultEvaluationContext.cs
- ValidationUtility.cs
- TypeNameParser.cs
- RawUIStateInputReport.cs
- dataprotectionpermission.cs
- ButtonColumn.cs
- NamedServiceModelExtensionCollectionElement.cs
- WebPartMinimizeVerb.cs
- DockEditor.cs
- WebBrowserDocumentCompletedEventHandler.cs
- NestPullup.cs
- BmpBitmapEncoder.cs
- MultipleViewProviderWrapper.cs
- UnsafeNativeMethods.cs
- ImageMapEventArgs.cs
- ClockController.cs
- WinFormsSecurity.cs
- ValidationRule.cs
- CacheSection.cs
- IdleTimeoutMonitor.cs
- SerializationAttributes.cs
- LoadRetryStrategyFactory.cs
- WCFModelStrings.Designer.cs
- RegisteredDisposeScript.cs
- BackgroundWorker.cs
- DocumentPageHost.cs
- HtmlInputControl.cs
- UnmanagedBitmapWrapper.cs
- LinkedResourceCollection.cs
- WindowPatternIdentifiers.cs