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
- ServicesExceptionNotHandledEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- CompatibleIComparer.cs
- altserialization.cs
- QueuePropertyVariants.cs
- TokenBasedSetEnumerator.cs
- InsufficientMemoryException.cs
- StringArrayConverter.cs
- SystemUdpStatistics.cs
- GatewayDefinition.cs
- RootProfilePropertySettingsCollection.cs
- Rect3D.cs
- Rss20FeedFormatter.cs
- DataGridViewIntLinkedList.cs
- TextServicesPropertyRanges.cs
- SecurityKeyIdentifier.cs
- DataServiceQueryProvider.cs
- DynamicFilter.cs
- validationstate.cs
- FacetValueContainer.cs
- MediaTimeline.cs
- GridViewAutomationPeer.cs
- NavigationHelper.cs
- SafeLibraryHandle.cs
- RegisteredDisposeScript.cs
- AdRotatorDesigner.cs
- BitmapMetadataEnumerator.cs
- FrameworkTemplate.cs
- Logging.cs
- SwitchExpression.cs
- XmlWrappingReader.cs
- SimpleTypeResolver.cs
- Pool.cs
- SchemaMapping.cs
- ComponentResourceKeyConverter.cs
- TextEditorCopyPaste.cs
- VisualStyleElement.cs
- MailAddress.cs
- LZCodec.cs
- MinimizableAttributeTypeConverter.cs
- ValidatorCompatibilityHelper.cs
- BoundField.cs
- SmiGettersStream.cs
- ObjectDataSourceFilteringEventArgs.cs
- HtmlShim.cs
- _WinHttpWebProxyDataBuilder.cs
- OleDbException.cs
- GeometryConverter.cs
- Base64Decoder.cs
- LinqDataSourceHelper.cs
- PageThemeCodeDomTreeGenerator.cs
- ConstrainedDataObject.cs
- ReadOnlyPropertyMetadata.cs
- TileModeValidation.cs
- MetadataProperty.cs
- XmlSecureResolver.cs
- DataRowView.cs
- DeploymentSectionCache.cs
- WebServiceMethodData.cs
- complextypematerializer.cs
- HandlerWithFactory.cs
- EventLogHandle.cs
- QilBinary.cs
- Utils.cs
- OAVariantLib.cs
- RadioButtonPopupAdapter.cs
- BuildProviderCollection.cs
- UnionExpr.cs
- figurelength.cs
- FixedHyperLink.cs
- BitSet.cs
- _ConnectStream.cs
- ArrayElementGridEntry.cs
- ScriptReferenceBase.cs
- MouseButtonEventArgs.cs
- InkCanvasFeedbackAdorner.cs
- MaterializeFromAtom.cs
- CustomCategoryAttribute.cs
- SingleKeyFrameCollection.cs
- XmlAnyElementAttributes.cs
- WebPartsPersonalization.cs
- DbProviderServices.cs
- ChannelSinkStacks.cs
- CheckBox.cs
- ConsoleKeyInfo.cs
- WebPartMenuStyle.cs
- FileStream.cs
- DataGridViewCheckBoxCell.cs
- Timeline.cs
- EllipseGeometry.cs
- ApplicationId.cs
- listviewsubitemcollectioneditor.cs
- CodeTypeMember.cs
- EntityDataSourceContextCreatedEventArgs.cs
- VectorKeyFrameCollection.cs
- DebugInfoExpression.cs
- ExpressionStringBuilder.cs
- ZipIOExtraFieldPaddingElement.cs
- ProcessModelInfo.cs
- MouseActionConverter.cs