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
- TextElementEnumerator.cs
- UIElement3DAutomationPeer.cs
- TransformerTypeCollection.cs
- KeyConstraint.cs
- FileFormatException.cs
- NotSupportedException.cs
- DataComponentGenerator.cs
- ToolboxBitmapAttribute.cs
- TextTreeFixupNode.cs
- PermissionToken.cs
- MenuItemCollectionEditorDialog.cs
- DesignerSerializationOptionsAttribute.cs
- _RegBlobWebProxyDataBuilder.cs
- ChineseLunisolarCalendar.cs
- XsdCachingReader.cs
- PropertyInfoSet.cs
- InstanceCollisionException.cs
- DateTimeOffset.cs
- WinEventTracker.cs
- AuthenticationManager.cs
- AppSettingsExpressionBuilder.cs
- NumberFormatInfo.cs
- TextServicesCompartment.cs
- OverlappedAsyncResult.cs
- ICollection.cs
- SubMenuStyle.cs
- RemotingServices.cs
- UnsafeNativeMethods.cs
- Baml6ConstructorInfo.cs
- List.cs
- RenderDataDrawingContext.cs
- CTreeGenerator.cs
- AsymmetricSignatureDeformatter.cs
- FontWeights.cs
- StrokeSerializer.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- OptimalTextSource.cs
- PackageDocument.cs
- SiteMapPath.cs
- CurrentChangedEventManager.cs
- PageFunction.cs
- BitmapCodecInfo.cs
- BufferedStream.cs
- odbcmetadatafactory.cs
- DefaultBindingPropertyAttribute.cs
- DateTimeSerializationSection.cs
- BamlResourceContent.cs
- CodeTypeDeclaration.cs
- QuerySubExprEliminator.cs
- TextModifierScope.cs
- ProgressPage.cs
- TdsParserStateObject.cs
- HybridObjectCache.cs
- PortCache.cs
- XmlDomTextWriter.cs
- FileDetails.cs
- IndexedGlyphRun.cs
- SQLInt64Storage.cs
- UnconditionalPolicy.cs
- ExtendedPropertyCollection.cs
- ValidationSummary.cs
- HtmlFormParameterWriter.cs
- AssemblyAttributesGoHere.cs
- LogicalMethodInfo.cs
- UpdatableGenericsFeature.cs
- Stackframe.cs
- Grammar.cs
- SqlTypeSystemProvider.cs
- IResourceProvider.cs
- TrackBarDesigner.cs
- ContainerActivationHelper.cs
- WmpBitmapDecoder.cs
- SoapIncludeAttribute.cs
- RemotingAttributes.cs
- _SecureChannel.cs
- DoubleAnimationUsingPath.cs
- CompilationLock.cs
- LinearKeyFrames.cs
- DataSpaceManager.cs
- TemplateBindingExtensionConverter.cs
- FragmentQueryProcessor.cs
- Propagator.ExtentPlaceholderCreator.cs
- RelationalExpressions.cs
- ConfigPathUtility.cs
- HtmlInputButton.cs
- CodeAttachEventStatement.cs
- ArglessEventHandlerProxy.cs
- HttpCookiesSection.cs
- ExternalException.cs
- Model3DGroup.cs
- Mouse.cs
- CodeNamespaceImportCollection.cs
- AtomMaterializer.cs
- ObjectViewFactory.cs
- TransformProviderWrapper.cs
- BamlRecordWriter.cs
- PeerNameRegistration.cs
- CustomWebEventKey.cs
- ComponentSerializationService.cs
- ValidatingPropertiesEventArgs.cs