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
- QueryStack.cs
- TextAutomationPeer.cs
- EventSinkActivityDesigner.cs
- Buffer.cs
- HttpModuleActionCollection.cs
- CodeGroup.cs
- DataServiceException.cs
- OpenFileDialog.cs
- CellPartitioner.cs
- CodeTypeMember.cs
- TableItemProviderWrapper.cs
- ResourceReferenceExpressionConverter.cs
- SystemWebSectionGroup.cs
- UnsafeNativeMethods.cs
- DataBoundControlDesigner.cs
- PathFigure.cs
- X509ChainPolicy.cs
- DNS.cs
- InnerItemCollectionView.cs
- SByteStorage.cs
- WebBrowserHelper.cs
- ResourcePool.cs
- XamlTypeMapper.cs
- storagemappingitemcollection.viewdictionary.cs
- DataAccessor.cs
- InvalidWMPVersionException.cs
- IgnorePropertiesAttribute.cs
- hresults.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ReachFixedDocumentSerializerAsync.cs
- ConnectionStringsExpressionBuilder.cs
- TransformPatternIdentifiers.cs
- Odbc32.cs
- DataViewManager.cs
- PathSegment.cs
- _NTAuthentication.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- EditorZoneAutoFormat.cs
- DataGridViewIntLinkedList.cs
- OrElse.cs
- ListViewDataItem.cs
- BuiltInExpr.cs
- XamlPoint3DCollectionSerializer.cs
- SplayTreeNode.cs
- RewritingSimplifier.cs
- PropertyOverridesTypeEditor.cs
- CollectionViewGroup.cs
- KeyedCollection.cs
- IIS7WorkerRequest.cs
- GridViewUpdatedEventArgs.cs
- __Error.cs
- DurableRuntimeValidator.cs
- CursorInteropHelper.cs
- FixedSchema.cs
- RowTypePropertyElement.cs
- TriggerBase.cs
- CheckBoxList.cs
- Models.cs
- HMACRIPEMD160.cs
- MetadataArtifactLoaderFile.cs
- GeometryValueSerializer.cs
- RemoteWebConfigurationHostServer.cs
- WindowsBrush.cs
- MatrixUtil.cs
- CodeMethodReturnStatement.cs
- PerformanceCounterPermissionEntry.cs
- EditorResources.cs
- Metadata.cs
- ConsumerConnectionPointCollection.cs
- PnrpPermission.cs
- MemoryMappedView.cs
- TextRangeAdaptor.cs
- BindStream.cs
- WindowsListBox.cs
- LicenseException.cs
- Msec.cs
- SessionState.cs
- SystemInformation.cs
- FlagPanel.cs
- InkPresenter.cs
- MSG.cs
- Executor.cs
- FromRequest.cs
- IsolatedStorageFile.cs
- TaiwanLunisolarCalendar.cs
- TreeNodeEventArgs.cs
- ConfigXmlText.cs
- CompilationPass2TaskInternal.cs
- ExpressionBinding.cs
- Ref.cs
- Hyperlink.cs
- PageWrapper.cs
- Fonts.cs
- OutputScope.cs
- DataTrigger.cs
- PropertyInformationCollection.cs
- MultipleViewPattern.cs
- CatalogZoneBase.cs
- MonitorWrapper.cs
- WebPartEditorCancelVerb.cs