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
- CreateUserErrorEventArgs.cs
- TranslateTransform.cs
- TopClause.cs
- SchemaImporterExtensionsSection.cs
- CounterCreationDataCollection.cs
- DataBindingCollectionConverter.cs
- SqlRemoveConstantOrderBy.cs
- DataBinder.cs
- Vector3DConverter.cs
- HelloMessage11.cs
- BaseDataBoundControl.cs
- PageWrapper.cs
- ImageConverter.cs
- AnimationClock.cs
- GuidelineSet.cs
- ControlCachePolicy.cs
- PropertyInformation.cs
- DataGridViewAdvancedBorderStyle.cs
- ClientSettingsProvider.cs
- DbConnectionStringBuilder.cs
- SeekStoryboard.cs
- CodeSnippetTypeMember.cs
- MissingMemberException.cs
- MonthCalendar.cs
- SessionPageStatePersister.cs
- TrackingQueryElement.cs
- Membership.cs
- ApplicationDirectoryMembershipCondition.cs
- BoolExpression.cs
- WorkflowNamespace.cs
- XmlRootAttribute.cs
- ContextProperty.cs
- AgileSafeNativeMemoryHandle.cs
- MachineKeyConverter.cs
- AdornerLayer.cs
- AsymmetricSignatureDeformatter.cs
- Matrix.cs
- ZoomPercentageConverter.cs
- ClientConfigPaths.cs
- ToolStripContextMenu.cs
- TextEditorContextMenu.cs
- PageBreakRecord.cs
- ISFTagAndGuidCache.cs
- ItemType.cs
- StatusBarPanel.cs
- ToolStripSettings.cs
- IpcManager.cs
- PageClientProxyGenerator.cs
- CngUIPolicy.cs
- WebPartZoneBaseDesigner.cs
- Vector3D.cs
- SiteMapPath.cs
- DecodeHelper.cs
- TailPinnedEventArgs.cs
- WebPartTransformerCollection.cs
- HttpResponseHeader.cs
- SourceChangedEventArgs.cs
- basecomparevalidator.cs
- MobileRedirect.cs
- ConnectionPoint.cs
- UserControlAutomationPeer.cs
- PointConverter.cs
- WindowsEditBox.cs
- XPathBuilder.cs
- ProviderMetadata.cs
- TextWriterTraceListener.cs
- RelationshipWrapper.cs
- Divide.cs
- TypeInfo.cs
- BitmapFrame.cs
- DataGridViewButtonColumn.cs
- SqlClientMetaDataCollectionNames.cs
- UpdatePanelTriggerCollection.cs
- SmtpClient.cs
- PropertyDescriptor.cs
- UriWriter.cs
- CacheMode.cs
- DataGridViewIntLinkedList.cs
- UserControl.cs
- UnsafeNativeMethodsTablet.cs
- ClientRuntimeConfig.cs
- BidirectionalDictionary.cs
- BaseTemplateBuildProvider.cs
- PopupRoot.cs
- PrintPreviewControl.cs
- ScriptManagerProxy.cs
- FormatVersion.cs
- FrameworkElementFactoryMarkupObject.cs
- WebBaseEventKeyComparer.cs
- RootBuilder.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- SerializationException.cs
- ActivityPropertyReference.cs
- XmlDataProvider.cs
- WebControl.cs
- ThreadWorkerController.cs
- HttpListenerTimeoutManager.cs
- ConnectionStringSettings.cs
- TextEditorSpelling.cs
- FixedSOMSemanticBox.cs