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
- WebPartTracker.cs
- CustomCategoryAttribute.cs
- ExcludePathInfo.cs
- AspNetHostingPermission.cs
- _Connection.cs
- ListControlActionList.cs
- PersonalizationDictionary.cs
- oledbconnectionstring.cs
- ProxyFragment.cs
- WebAdminConfigurationHelper.cs
- TypeUtil.cs
- UserMapPath.cs
- __TransparentProxy.cs
- CheckBoxField.cs
- precedingquery.cs
- ExpressionPrefixAttribute.cs
- XmlNodeComparer.cs
- SettingsPropertyIsReadOnlyException.cs
- MachineKey.cs
- FunctionImportMapping.cs
- FixedDSBuilder.cs
- XmlSortKey.cs
- HtmlInputImage.cs
- TableLayoutStyle.cs
- InvalidComObjectException.cs
- ScrollBarRenderer.cs
- ToolZone.cs
- BitStream.cs
- CodeCatchClauseCollection.cs
- Tile.cs
- LocalizationParserHooks.cs
- FieldNameLookup.cs
- IfJoinedCondition.cs
- AncillaryOps.cs
- ObjectListFieldCollection.cs
- wgx_commands.cs
- DesignerActionItemCollection.cs
- StructuralType.cs
- AsyncWaitHandle.cs
- Debug.cs
- InvalidWMPVersionException.cs
- Image.cs
- TextServicesCompartment.cs
- TreeNodeStyle.cs
- Button.cs
- MatrixCamera.cs
- TimeoutHelper.cs
- EastAsianLunisolarCalendar.cs
- PasswordTextNavigator.cs
- DataReaderContainer.cs
- MobileListItem.cs
- MouseCaptureWithinProperty.cs
- ExpressionBuilder.cs
- ConstructorExpr.cs
- XmlDataLoader.cs
- Int16.cs
- SendParametersContent.cs
- ClientCultureInfo.cs
- CrossAppDomainChannel.cs
- StringResourceManager.cs
- ConfigurationManagerInternal.cs
- ConfigurationLockCollection.cs
- EDesignUtil.cs
- WebPartChrome.cs
- Vector3dCollection.cs
- COM2Properties.cs
- Polygon.cs
- NetworkStream.cs
- MemberDescriptor.cs
- TemplateKeyConverter.cs
- InstanceDescriptor.cs
- SqlException.cs
- Stroke.cs
- Int32KeyFrameCollection.cs
- DataGridBoolColumn.cs
- MenuItemBinding.cs
- ConfigXmlWhitespace.cs
- TagPrefixCollection.cs
- XPathAxisIterator.cs
- Pool.cs
- TaiwanCalendar.cs
- SerializationSectionGroup.cs
- WinFormsSpinner.cs
- Calendar.cs
- ModifierKeysConverter.cs
- DataBinder.cs
- FileResponseElement.cs
- ThaiBuddhistCalendar.cs
- SerializerDescriptor.cs
- XsdCachingReader.cs
- DefaultTextStore.cs
- BasicExpressionVisitor.cs
- StylusPointPropertyId.cs
- DeclarativeConditionsCollection.cs
- StylusPointPropertyInfoDefaults.cs
- IndentTextWriter.cs
- XPathAncestorIterator.cs
- FormatStringEditor.cs
- XmlDigitalSignatureProcessor.cs
- PropertyToken.cs