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
- ConfigXmlAttribute.cs
- Vector3DAnimationBase.cs
- JournalEntryStack.cs
- GuidTagList.cs
- HelpEvent.cs
- TriggerActionCollection.cs
- ResolveCompletedEventArgs.cs
- OdbcEnvironment.cs
- SqlSelectStatement.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ShaderRenderModeValidation.cs
- AuthStoreRoleProvider.cs
- PrefixQName.cs
- MenuItemBinding.cs
- DependencyPropertyChangedEventArgs.cs
- TimelineGroup.cs
- baseaxisquery.cs
- XamlStyleSerializer.cs
- BasicHttpSecurityMode.cs
- BindingExpressionUncommonField.cs
- SerializationSectionGroup.cs
- CriticalHandle.cs
- PathGradientBrush.cs
- CodeIdentifier.cs
- Vertex.cs
- SymmetricKeyWrap.cs
- FusionWrap.cs
- ListSourceHelper.cs
- NamedPipeTransportManager.cs
- ColorContextHelper.cs
- AuthorizationSection.cs
- BulletedList.cs
- NumericUpDownAcceleration.cs
- ResourceContainer.cs
- CharConverter.cs
- WebProxyScriptElement.cs
- DataGridViewCellStyleChangedEventArgs.cs
- CheckBoxRenderer.cs
- BitmapFrameEncode.cs
- columnmapkeybuilder.cs
- clipboard.cs
- InputLangChangeRequestEvent.cs
- GeometryCombineModeValidation.cs
- ManagedCodeMarkers.cs
- SafeRightsManagementEnvironmentHandle.cs
- UInt16Storage.cs
- PermissionRequestEvidence.cs
- ListenerElementsCollection.cs
- ResourceKey.cs
- Ray3DHitTestResult.cs
- DynamicDataManager.cs
- FrameworkContentElementAutomationPeer.cs
- WebBrowserSiteBase.cs
- PointAnimationUsingPath.cs
- LinearGradientBrush.cs
- SoapMessage.cs
- ConditionalDesigner.cs
- StringComparer.cs
- CallbackValidatorAttribute.cs
- DesignerActionVerbList.cs
- Form.cs
- CodeGroup.cs
- StringFreezingAttribute.cs
- GridViewPageEventArgs.cs
- figurelengthconverter.cs
- Math.cs
- ResourcesBuildProvider.cs
- ToolBarButton.cs
- BinaryMethodMessage.cs
- ResourceExpression.cs
- precedingsibling.cs
- Avt.cs
- Keyboard.cs
- FilterEventArgs.cs
- ApplicationException.cs
- XmlSchemaSequence.cs
- WebBrowserSiteBase.cs
- ExceptionValidationRule.cs
- CodeDirectoryCompiler.cs
- MetadataProperty.cs
- RelativeSource.cs
- ActivityCollectionMarkupSerializer.cs
- TypeTypeConverter.cs
- HttpContextServiceHost.cs
- SerializationFieldInfo.cs
- SortDescriptionCollection.cs
- SplitterPanel.cs
- X509IssuerSerialKeyIdentifierClause.cs
- ChangePasswordAutoFormat.cs
- SpecialTypeDataContract.cs
- WindowInteropHelper.cs
- BrushValueSerializer.cs
- StateMachineDesignerPaint.cs
- ToolStripHighContrastRenderer.cs
- ImageCreator.cs
- PublisherIdentityPermission.cs
- XmlHelper.cs
- BasicKeyConstraint.cs
- RegexCode.cs
- MsmqHostedTransportManager.cs