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
- WmlTextViewAdapter.cs
- IsolatedStorage.cs
- ConfigXmlWhitespace.cs
- WindowsToolbarAsMenu.cs
- WebBrowser.cs
- LocalFileSettingsProvider.cs
- ModelPerspective.cs
- WSHttpBinding.cs
- RenderingEventArgs.cs
- CustomPopupPlacement.cs
- SelectionEditor.cs
- DataGridItemEventArgs.cs
- SafeTokenHandle.cs
- CheckBoxStandardAdapter.cs
- ColorEditor.cs
- DoneReceivingAsyncResult.cs
- WebConvert.cs
- BitmapEffectCollection.cs
- DataTemplateSelector.cs
- FigureParaClient.cs
- MembershipPasswordException.cs
- MenuItemCollection.cs
- ObjectViewFactory.cs
- PolicyImporterElementCollection.cs
- LineServicesCallbacks.cs
- ScriptResourceAttribute.cs
- SmiContextFactory.cs
- MembershipSection.cs
- ListBox.cs
- BasicExpandProvider.cs
- UriExt.cs
- DBConcurrencyException.cs
- Cell.cs
- JumpPath.cs
- _DigestClient.cs
- ContainerUtilities.cs
- TextSegment.cs
- xmlfixedPageInfo.cs
- SqlDataSourceFilteringEventArgs.cs
- Metadata.cs
- Socket.cs
- XamlFilter.cs
- CheckBoxField.cs
- SystemUnicastIPAddressInformation.cs
- RepeaterItemEventArgs.cs
- ArgumentValueSerializer.cs
- NavigationFailedEventArgs.cs
- XPathParser.cs
- HtmlLink.cs
- Walker.cs
- GeometryHitTestResult.cs
- GuidConverter.cs
- ClientBuildManager.cs
- HttpGetProtocolImporter.cs
- IdentityNotMappedException.cs
- SettingsBindableAttribute.cs
- SmtpReplyReader.cs
- TextWriter.cs
- Types.cs
- TextDpi.cs
- IOThreadScheduler.cs
- DocumentXPathNavigator.cs
- HttpListenerRequestUriBuilder.cs
- SettingsProperty.cs
- DesignTimeVisibleAttribute.cs
- ToolStripPanelRenderEventArgs.cs
- StaticSiteMapProvider.cs
- DateTimeFormatInfo.cs
- xml.cs
- RunInstallerAttribute.cs
- IgnoreFlushAndCloseStream.cs
- HttpInputStream.cs
- XmlWhitespace.cs
- DesignerContextDescriptor.cs
- DataObjectSettingDataEventArgs.cs
- BamlRecords.cs
- ScriptModule.cs
- UriSectionReader.cs
- FaultFormatter.cs
- ResetableIterator.cs
- _NtlmClient.cs
- MulticastDelegate.cs
- BufferedReceiveManager.cs
- CompareValidator.cs
- EntryIndex.cs
- ModelTreeManager.cs
- SchemaNamespaceManager.cs
- FileSystemEventArgs.cs
- XmlEnumAttribute.cs
- MsmqInputSessionChannel.cs
- FreezableOperations.cs
- SplineKeyFrames.cs
- CodeSubDirectory.cs
- LinqDataSourceContextEventArgs.cs
- AssertFilter.cs
- GeneralTransform2DTo3D.cs
- SerializationStore.cs
- ResourceExpression.cs
- MsmqInputChannelBase.cs
- SiteIdentityPermission.cs