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
- Types.cs
- _Semaphore.cs
- SqlUdtInfo.cs
- ChangeDirector.cs
- DoubleAnimationBase.cs
- IPEndPoint.cs
- Html32TextWriter.cs
- TextSimpleMarkerProperties.cs
- TextFragmentEngine.cs
- DataSourceCacheDurationConverter.cs
- SqlGatherConsumedAliases.cs
- EdmItemCollection.OcAssemblyCache.cs
- ImageSourceConverter.cs
- GlyphCache.cs
- DashStyle.cs
- IntegrationExceptionEventArgs.cs
- XmlSubtreeReader.cs
- Color.cs
- SystemColors.cs
- DoubleAnimationUsingPath.cs
- AssemblyEvidenceFactory.cs
- uribuilder.cs
- OleDbStruct.cs
- AssertFilter.cs
- Int32Rect.cs
- __Error.cs
- ZipIOExtraFieldPaddingElement.cs
- GlobalItem.cs
- Pkcs9Attribute.cs
- DocumentXmlWriter.cs
- NavigatorInput.cs
- XPathArrayIterator.cs
- GridViewCancelEditEventArgs.cs
- WebContext.cs
- DataGridPagerStyle.cs
- WebPartConnectionCollection.cs
- MarshalByRefObject.cs
- FixedDSBuilder.cs
- UpdatePanelTrigger.cs
- SecurityResources.cs
- TypeConverterAttribute.cs
- CutCopyPasteHelper.cs
- TextEndOfSegment.cs
- ImageClickEventArgs.cs
- FontFamilyConverter.cs
- VirtualPathUtility.cs
- ProcessHostMapPath.cs
- Animatable.cs
- UnhandledExceptionEventArgs.cs
- Parameter.cs
- PostBackOptions.cs
- ConvertEvent.cs
- WeakHashtable.cs
- IdleTimeoutMonitor.cs
- XmlBinaryReader.cs
- FileDialog.cs
- EntityDataSourceStatementEditorForm.cs
- AutomationProperties.cs
- cryptoapiTransform.cs
- TdsRecordBufferSetter.cs
- EventDescriptorCollection.cs
- SiteOfOriginPart.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- CompiledXpathExpr.cs
- NativeObjectSecurity.cs
- NumberFormatInfo.cs
- DataServiceResponse.cs
- DataGridViewCellMouseEventArgs.cs
- SettingsSavedEventArgs.cs
- URLBuilder.cs
- SiteMapDataSourceView.cs
- TransformerInfo.cs
- JournalEntryListConverter.cs
- ResourceLoader.cs
- Base64Encoder.cs
- SecurityTokenAttachmentMode.cs
- securitycriticaldataformultiplegetandset.cs
- ServicePoint.cs
- ListViewUpdatedEventArgs.cs
- TaskCanceledException.cs
- EmptyReadOnlyDictionaryInternal.cs
- MouseGestureValueSerializer.cs
- UrlMapping.cs
- EncoderNLS.cs
- SignatureDescription.cs
- AnnotationResourceChangedEventArgs.cs
- XsdValidatingReader.cs
- MatrixValueSerializer.cs
- BCryptSafeHandles.cs
- FormsAuthenticationCredentials.cs
- PartitionResolver.cs
- ZipFileInfoCollection.cs
- ConvertEvent.cs
- ICollection.cs
- DrawListViewItemEventArgs.cs
- BoolExpr.cs
- DataGridViewSelectedColumnCollection.cs
- AccessKeyManager.cs
- DataGrid.cs
- WebEvents.cs