Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceEntityTypeFilterItem.cs / 3 / EntityDataSourceEntityTypeFilterItem.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System.Data.Metadata.Edm; namespace System.Web.UI.Design.WebControls { internal class EntityDataSourceEntityTypeFilterItem : 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 EntityType _entityType; // used when we have a real EntityType backing this item private readonly string _unknownEntityTypeName; // used when we have an unknown EntityTypeFilter that we still want to include in the list internal EntityDataSourceEntityTypeFilterItem(EntityType entityType) { _entityType = entityType; } internal EntityDataSourceEntityTypeFilterItem(string unknownEntityTypeName) { _unknownEntityTypeName = unknownEntityTypeName; } internal string EntityTypeName { get { if (_entityType != null) { return _entityType.Name; } else { return _unknownEntityTypeName; } } } internal EntityType EntityType { get { return _entityType; } } public override string ToString() { return EntityTypeName; } int IComparable .CompareTo(EntityDataSourceEntityTypeFilterItem other) { return (String.Compare(this.EntityTypeName, other.EntityTypeName, 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 EntityDataSourceEntityTypeFilterItem : 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 EntityType _entityType; // used when we have a real EntityType backing this item private readonly string _unknownEntityTypeName; // used when we have an unknown EntityTypeFilter that we still want to include in the list internal EntityDataSourceEntityTypeFilterItem(EntityType entityType) { _entityType = entityType; } internal EntityDataSourceEntityTypeFilterItem(string unknownEntityTypeName) { _unknownEntityTypeName = unknownEntityTypeName; } internal string EntityTypeName { get { if (_entityType != null) { return _entityType.Name; } else { return _unknownEntityTypeName; } } } internal EntityType EntityType { get { return _entityType; } } public override string ToString() { return EntityTypeName; } int IComparable .CompareTo(EntityDataSourceEntityTypeFilterItem other) { return (String.Compare(this.EntityTypeName, other.EntityTypeName, 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
- RemoteWebConfigurationHostServer.cs
- Monitor.cs
- DivideByZeroException.cs
- PolicyReader.cs
- XmlSchemaObjectCollection.cs
- EqualityComparer.cs
- XamlInt32CollectionSerializer.cs
- XmlLanguageConverter.cs
- ObjectConverter.cs
- TreeNodeCollection.cs
- SamlAction.cs
- InputProcessorProfilesLoader.cs
- shaperfactory.cs
- LayoutManager.cs
- Vector3D.cs
- HandleCollector.cs
- AlphabeticalEnumConverter.cs
- TableLayoutSettings.cs
- Point.cs
- DataGridColumn.cs
- PointCollectionValueSerializer.cs
- RemoteEndpointMessageProperty.cs
- PersonalizationStateInfoCollection.cs
- CurrentChangedEventManager.cs
- DataControlReferenceCollection.cs
- DataGridViewTextBoxCell.cs
- BackEase.cs
- SemaphoreFullException.cs
- SetStateEventArgs.cs
- SimpleHandlerFactory.cs
- ResourcePool.cs
- AnnouncementEventArgs.cs
- XmlSchemaSimpleType.cs
- ButtonChrome.cs
- ClientOptions.cs
- ShaderEffect.cs
- EdmType.cs
- ColorTransformHelper.cs
- pingexception.cs
- MsmqInputSessionChannelListener.cs
- Win32Interop.cs
- XslCompiledTransform.cs
- TogglePattern.cs
- XmlAnyAttributeAttribute.cs
- WindowsStatusBar.cs
- MenuItemBinding.cs
- RegisteredDisposeScript.cs
- WindowsFormsHostAutomationPeer.cs
- DataKey.cs
- SystemIPGlobalStatistics.cs
- XamlStream.cs
- DataSourceControl.cs
- SuppressMergeCheckAttribute.cs
- BatchWriter.cs
- SQLBytesStorage.cs
- MDIClient.cs
- PersonalizableAttribute.cs
- LicenseContext.cs
- AddingNewEventArgs.cs
- ConstantExpression.cs
- FaultContext.cs
- XPathNode.cs
- BindingWorker.cs
- Token.cs
- PassportAuthenticationEventArgs.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ClientEndpointLoader.cs
- OdbcUtils.cs
- LifetimeManager.cs
- FreeIndexList.cs
- FixedSOMLineRanges.cs
- SystemException.cs
- Point3DAnimation.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- WindowsSlider.cs
- TextElementEnumerator.cs
- SizeLimitedCache.cs
- __FastResourceComparer.cs
- RenderContext.cs
- ParsedAttributeCollection.cs
- MemberBinding.cs
- DifferencingCollection.cs
- GridErrorDlg.cs
- RecognizedWordUnit.cs
- DesignerSerializerAttribute.cs
- MethodResolver.cs
- ExtentKey.cs
- Adorner.cs
- TableLayout.cs
- NetworkInformationPermission.cs
- CommandSet.cs
- DeploymentSectionCache.cs
- webeventbuffer.cs
- DelimitedListTraceListener.cs
- XmlSubtreeReader.cs
- TabControlEvent.cs
- handlecollector.cs
- CachedTypeface.cs
- GridToolTip.cs
- SortDescription.cs