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
- TdsParser.cs
- EnumValAlphaComparer.cs
- RefreshEventArgs.cs
- PageHandlerFactory.cs
- FixedSOMGroup.cs
- EnumValAlphaComparer.cs
- Image.cs
- WebPartExportVerb.cs
- PolicyStatement.cs
- OverflowException.cs
- UserPersonalizationStateInfo.cs
- SemanticBasicElement.cs
- XmlDataSourceNodeDescriptor.cs
- AutomationAttributeInfo.cs
- ContentPresenter.cs
- SmiXetterAccessMap.cs
- _TLSstream.cs
- RtfToXamlLexer.cs
- CacheMemory.cs
- DataKey.cs
- CatalogPartChrome.cs
- TextFormatterImp.cs
- AliasGenerator.cs
- _LocalDataStore.cs
- ProviderConnectionPoint.cs
- ComponentDispatcherThread.cs
- FileDataSourceCache.cs
- Function.cs
- Socket.cs
- TypeSemantics.cs
- WeakReferenceEnumerator.cs
- Misc.cs
- AutomationPropertyInfo.cs
- FileLevelControlBuilderAttribute.cs
- XPathDocumentNavigator.cs
- FilterEventArgs.cs
- ImportContext.cs
- UIElementCollection.cs
- IdnElement.cs
- ToolStripScrollButton.cs
- CategoryAttribute.cs
- ArgumentDesigner.xaml.cs
- LineServicesCallbacks.cs
- Mappings.cs
- TemplateParser.cs
- DiagnosticTrace.cs
- UnhandledExceptionEventArgs.cs
- Light.cs
- PersonalizableTypeEntry.cs
- Screen.cs
- ApplicationDirectory.cs
- ToolZone.cs
- MimeImporter.cs
- UdpChannelListener.cs
- SignatureDescription.cs
- HttpCapabilitiesSectionHandler.cs
- ObjectMemberMapping.cs
- StyleBamlTreeBuilder.cs
- RelationshipEntry.cs
- RecipientServiceModelSecurityTokenRequirement.cs
- ListViewGroupItemCollection.cs
- FixedFlowMap.cs
- Walker.cs
- ResourceReferenceExpression.cs
- RsaKeyGen.cs
- VariableQuery.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ProviderMetadata.cs
- PrintDocument.cs
- UnmanagedMemoryStreamWrapper.cs
- RegexReplacement.cs
- XmlBinaryWriter.cs
- SqlUdtInfo.cs
- SecurityCapabilities.cs
- SqlServices.cs
- CompareValidator.cs
- TextEditorSelection.cs
- FontDifferentiator.cs
- ColorKeyFrameCollection.cs
- ScrollBarRenderer.cs
- PreProcessor.cs
- ProfileParameter.cs
- FunctionImportMapping.cs
- ApplicationId.cs
- HierarchicalDataBoundControlAdapter.cs
- BindingUtils.cs
- SQLByteStorage.cs
- SoapIncludeAttribute.cs
- ForwardPositionQuery.cs
- SubstitutionList.cs
- SchemaObjectWriter.cs
- ListSortDescription.cs
- XComponentModel.cs
- AppDomainUnloadedException.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- OdbcConnectionStringbuilder.cs
- XmlSerializationWriter.cs
- _TLSstream.cs
- FlowLayout.cs
- _ListenerAsyncResult.cs