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
- GroupByExpressionRewriter.cs
- RuleSettings.cs
- HandlerFactoryCache.cs
- DES.cs
- Exceptions.cs
- DataBindingHandlerAttribute.cs
- Pen.cs
- MultilineStringEditor.cs
- IPPacketInformation.cs
- WhitespaceRule.cs
- SessionIDManager.cs
- NamedObject.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SamlConstants.cs
- AbstractDataSvcMapFileLoader.cs
- PerformanceCountersBase.cs
- ADMembershipProvider.cs
- DataServiceContext.cs
- Localizer.cs
- IndexedString.cs
- Ticks.cs
- XmlMapping.cs
- TemplateXamlParser.cs
- WebBrowserSiteBase.cs
- RoutedPropertyChangedEventArgs.cs
- TypeNameConverter.cs
- ConfigXmlAttribute.cs
- WebServiceClientProxyGenerator.cs
- FormsAuthenticationTicket.cs
- DbParameterHelper.cs
- MachineKeySection.cs
- VisualTreeHelper.cs
- DesignerActionVerbItem.cs
- ResponseBodyWriter.cs
- EntitySqlException.cs
- sitestring.cs
- ExpressionBuilderCollection.cs
- Polygon.cs
- HitTestResult.cs
- CodeIndexerExpression.cs
- DbProviderFactoriesConfigurationHandler.cs
- Span.cs
- MenuItemCollectionEditor.cs
- XmlLanguage.cs
- CodeCommentStatementCollection.cs
- ScrollViewer.cs
- CapabilitiesUse.cs
- DriveNotFoundException.cs
- UrlMappingsSection.cs
- TextTreeTextElementNode.cs
- _IPv6Address.cs
- PowerModeChangedEventArgs.cs
- Decimal.cs
- UnknownBitmapDecoder.cs
- MobileControlDesigner.cs
- GridViewRowCollection.cs
- DefaultValueTypeConverter.cs
- SystemIPInterfaceStatistics.cs
- DatePicker.cs
- EventSourceCreationData.cs
- Operator.cs
- ComPlusTypeLoader.cs
- FigureParaClient.cs
- IsolatedStorage.cs
- UidManager.cs
- PointKeyFrameCollection.cs
- WindowPattern.cs
- DesignerSerializationOptionsAttribute.cs
- ToolboxItem.cs
- TextTreeInsertUndoUnit.cs
- ToolboxItemImageConverter.cs
- DesignerCategoryAttribute.cs
- XmlSchemaSimpleContentRestriction.cs
- SystemResourceKey.cs
- SetStoryboardSpeedRatio.cs
- FileDialogPermission.cs
- GlobalEventManager.cs
- GlyphElement.cs
- BamlResourceSerializer.cs
- GetWinFXPath.cs
- GeometryHitTestResult.cs
- URLIdentityPermission.cs
- UserMapPath.cs
- validation.cs
- MeasureItemEvent.cs
- ApplicationProxyInternal.cs
- ScrollChangedEventArgs.cs
- SiteMapPath.cs
- FormParameter.cs
- Context.cs
- PasswordTextNavigator.cs
- Int32.cs
- TypeElement.cs
- EnumUnknown.cs
- ObjectStorage.cs
- EndOfStreamException.cs
- QilGenerator.cs
- AsymmetricSignatureDeformatter.cs
- SetterBaseCollection.cs
- AccessControlList.cs