Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceEntityTypeFilterItem.cs / 1305376 / 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
- AttachmentCollection.cs
- SocketPermission.cs
- xamlnodes.cs
- SpotLight.cs
- Freezable.cs
- AssemblyName.cs
- OutputCacheModule.cs
- DisableDpiAwarenessAttribute.cs
- MessageRpc.cs
- DesignerActionService.cs
- XmlAggregates.cs
- DataExpression.cs
- BitmapEffectInput.cs
- AssertSection.cs
- SoapIgnoreAttribute.cs
- GeneralTransform3DCollection.cs
- PostBackOptions.cs
- ELinqQueryState.cs
- BitStream.cs
- DataControlButton.cs
- BinaryFormatterWriter.cs
- MsmqReceiveParameters.cs
- PixelShader.cs
- IdentityReference.cs
- NavigatorInput.cs
- RuntimeVariablesExpression.cs
- DescriptionAttribute.cs
- ExceptionUtil.cs
- EncoderNLS.cs
- EntityCollection.cs
- XmlSchemaSimpleContentRestriction.cs
- ManipulationStartedEventArgs.cs
- View.cs
- XmlILAnnotation.cs
- TableLayoutPanelCellPosition.cs
- PartitionedStream.cs
- SelectionEditor.cs
- StreamUpgradeInitiator.cs
- TagMapCollection.cs
- DataPagerFieldItem.cs
- HashAlgorithm.cs
- SqlSupersetValidator.cs
- CodeAttributeArgument.cs
- SvcMapFileLoader.cs
- ObjectDisposedException.cs
- FeatureManager.cs
- ApplicationServiceManager.cs
- StorageEntityContainerMapping.cs
- BufferedGraphics.cs
- ContractMethodParameterInfo.cs
- EntityReference.cs
- CommandPlan.cs
- XmlWriterSettings.cs
- MetabaseSettings.cs
- SortDescriptionCollection.cs
- ColumnMapVisitor.cs
- FlowDocumentFormatter.cs
- GradientSpreadMethodValidation.cs
- NativeMethodsCLR.cs
- ConstNode.cs
- DetailsViewUpdatedEventArgs.cs
- ProfileEventArgs.cs
- BoundingRectTracker.cs
- DPAPIProtectedConfigurationProvider.cs
- BrushMappingModeValidation.cs
- IntegerValidator.cs
- SQLBoolean.cs
- ParserHooks.cs
- KeyBinding.cs
- TextBreakpoint.cs
- SchemaElement.cs
- XmlDeclaration.cs
- EllipseGeometry.cs
- BitmapImage.cs
- InternalCompensate.cs
- PathSegmentCollection.cs
- CipherData.cs
- AuthenticationModulesSection.cs
- SizeLimitedCache.cs
- CodeVariableDeclarationStatement.cs
- MdImport.cs
- DictionaryKeyPropertyAttribute.cs
- BitVec.cs
- SerializerDescriptor.cs
- CompensationHandlingFilter.cs
- Point.cs
- InstanceKeyCompleteException.cs
- DesignerTransactionCloseEvent.cs
- CompModSwitches.cs
- ToggleProviderWrapper.cs
- Point4D.cs
- GridEntryCollection.cs
- OleDbWrapper.cs
- RawMouseInputReport.cs
- GridViewColumnCollection.cs
- SpeechDetectedEventArgs.cs
- OleDbFactory.cs
- RemotingException.cs
- PassportAuthentication.cs
- DataGridViewTextBoxEditingControl.cs