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
- Vector3DAnimation.cs
- CommandEventArgs.cs
- COM2FontConverter.cs
- XmlSerializationReader.cs
- _TLSstream.cs
- PeerNameRecord.cs
- FontUnit.cs
- Buffer.cs
- XmlAttributeCollection.cs
- SqlTriggerContext.cs
- Section.cs
- Int32RectValueSerializer.cs
- AuthorizationContext.cs
- MgmtConfigurationRecord.cs
- AjaxFrameworkAssemblyAttribute.cs
- DataGridSortCommandEventArgs.cs
- CompensateDesigner.cs
- SqlParameter.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- SingleObjectCollection.cs
- ZipIOFileItemStream.cs
- SizeAnimationClockResource.cs
- CultureSpecificCharacterBufferRange.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- IPEndPointCollection.cs
- SqlInternalConnectionTds.cs
- XslAst.cs
- TypeHelpers.cs
- ClipboardProcessor.cs
- ListViewSelectEventArgs.cs
- XmlCharType.cs
- HtmlElementCollection.cs
- Root.cs
- Identity.cs
- MasterPageCodeDomTreeGenerator.cs
- xmlsaver.cs
- COM2ComponentEditor.cs
- XmlSchemaAttributeGroup.cs
- ObjectDataSourceDisposingEventArgs.cs
- Wizard.cs
- MissingMemberException.cs
- SoapUnknownHeader.cs
- PenThread.cs
- ToolStripDesignerAvailabilityAttribute.cs
- DynamicPropertyReader.cs
- XmlSchemaAttributeGroupRef.cs
- TransformDescriptor.cs
- MutexSecurity.cs
- TaiwanLunisolarCalendar.cs
- XhtmlBasicPanelAdapter.cs
- PageContentCollection.cs
- ListViewDeleteEventArgs.cs
- BaseResourcesBuildProvider.cs
- InteropBitmapSource.cs
- WebScriptMetadataFormatter.cs
- UrlEncodedParameterWriter.cs
- OutOfMemoryException.cs
- rsa.cs
- DateTimeUtil.cs
- mediapermission.cs
- ActivationProxy.cs
- ShapingEngine.cs
- ComPersistableTypeElementCollection.cs
- WindowsFormsLinkLabel.cs
- Emitter.cs
- FormViewDeleteEventArgs.cs
- ContainerControl.cs
- FreezableDefaultValueFactory.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- XmlSchemaAnyAttribute.cs
- Base64Encoding.cs
- Keywords.cs
- CodeGroup.cs
- ObjectStateFormatter.cs
- HostingPreferredMapPath.cs
- ConfigXmlAttribute.cs
- WebPartConnectionsCancelEventArgs.cs
- ViewGenerator.cs
- WebMessageEncodingElement.cs
- ValidatorUtils.cs
- ProgressBarRenderer.cs
- CodeGenerator.cs
- CompoundFileDeflateTransform.cs
- HashHelper.cs
- latinshape.cs
- ImageListUtils.cs
- UniformGrid.cs
- DBAsyncResult.cs
- NativeCppClassAttribute.cs
- SQLInt32Storage.cs
- X509PeerCertificateElement.cs
- TextServicesCompartmentEventSink.cs
- PreProcessor.cs
- BlurBitmapEffect.cs
- AuthenticationManager.cs
- PowerModeChangedEventArgs.cs
- EdmToObjectNamespaceMap.cs
- PrinterSettings.cs
- Label.cs
- Function.cs