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
- GenericUriParser.cs
- RepeaterItem.cs
- WorkflowInstanceQuery.cs
- LocalFileSettingsProvider.cs
- EditingMode.cs
- CheckedListBox.cs
- ConfigXmlWhitespace.cs
- ObjectStateEntry.cs
- EntityProviderServices.cs
- ArrayWithOffset.cs
- SqlDataSourceFilteringEventArgs.cs
- PresentationSource.cs
- UrlPath.cs
- HiddenFieldPageStatePersister.cs
- URLIdentityPermission.cs
- Button.cs
- KeyEvent.cs
- RepeatBehaviorConverter.cs
- ContextStaticAttribute.cs
- CornerRadiusConverter.cs
- ReachBasicContext.cs
- ReferenceTypeElement.cs
- RequestTimeoutManager.cs
- UnsafeNativeMethods.cs
- UpdateManifestForBrowserApplication.cs
- NameValueConfigurationCollection.cs
- SchemaElementDecl.cs
- TdsValueSetter.cs
- SecurityCriticalDataForSet.cs
- SrgsRule.cs
- BoundConstants.cs
- BamlLocalizableResource.cs
- Rfc2898DeriveBytes.cs
- ProvideValueServiceProvider.cs
- TextDecorationUnitValidation.cs
- DataGridCaption.cs
- ListBindableAttribute.cs
- WebPartDisplayModeCancelEventArgs.cs
- GenericTypeParameterBuilder.cs
- TraceEventCache.cs
- brushes.cs
- ContentType.cs
- FormDocumentDesigner.cs
- XmlWellformedWriter.cs
- ArithmeticException.cs
- EntityDataSourceDataSelection.cs
- AsymmetricAlgorithm.cs
- DragCompletedEventArgs.cs
- DateTimeOffset.cs
- SessionStateContainer.cs
- UrlMapping.cs
- AutomationPattern.cs
- ObjectTypeMapping.cs
- EdmPropertyAttribute.cs
- ToolStripGrip.cs
- BinaryWriter.cs
- AppDomainManager.cs
- WebPageTraceListener.cs
- ListBase.cs
- UnmanagedMarshal.cs
- StylusPlugin.cs
- ToolStripDropDownItem.cs
- AppDomainInstanceProvider.cs
- LayoutTable.cs
- IteratorFilter.cs
- PkcsUtils.cs
- ObfuscateAssemblyAttribute.cs
- COAUTHIDENTITY.cs
- Parser.cs
- RegexTree.cs
- Rotation3DAnimation.cs
- TokenizerHelper.cs
- InternalsVisibleToAttribute.cs
- PointCollection.cs
- TransportSecurityBindingElement.cs
- ListViewItemEventArgs.cs
- TextParagraph.cs
- CqlLexer.cs
- StyleCollection.cs
- ComplexType.cs
- QueryOutputWriter.cs
- LinqDataSourceSelectEventArgs.cs
- DataTableReaderListener.cs
- ButtonChrome.cs
- SchemaMerger.cs
- InputLanguageCollection.cs
- DbConnectionPoolGroup.cs
- xmlfixedPageInfo.cs
- ContextMenuStrip.cs
- XslTransform.cs
- ValidationService.cs
- TcpServerChannel.cs
- httpserverutility.cs
- InternalReceiveMessage.cs
- TransactionScopeDesigner.cs
- Freezable.cs
- DataServiceContext.cs
- ButtonField.cs
- SiteMapProvider.cs
- ObjectFactoryCodeDomTreeGenerator.cs