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
- Int64Animation.cs
- HttpRequestTraceRecord.cs
- BuildProviderAppliesToAttribute.cs
- TrackingProfile.cs
- Rotation3DAnimationBase.cs
- HtmlFormParameterWriter.cs
- ResourceDefaultValueAttribute.cs
- DynamicPropertyHolder.cs
- SettingsPropertyNotFoundException.cs
- EncryptedPackage.cs
- Light.cs
- StorageAssociationTypeMapping.cs
- ArrayElementGridEntry.cs
- SoapIncludeAttribute.cs
- SqlCommandBuilder.cs
- TreeNodeCollection.cs
- ValidateNames.cs
- ZipIOBlockManager.cs
- TextTreeUndo.cs
- AccessText.cs
- ColumnHeaderConverter.cs
- XmlNamespaceMapping.cs
- DBCSCodePageEncoding.cs
- WmpBitmapEncoder.cs
- BrowserTree.cs
- ResolveMatches11.cs
- UIHelper.cs
- Timer.cs
- ListView.cs
- ConfigurationPermission.cs
- Funcletizer.cs
- Font.cs
- ThemeInfoAttribute.cs
- NonBatchDirectoryCompiler.cs
- GeneralTransform2DTo3D.cs
- HttpRuntimeSection.cs
- BitmapEffectGroup.cs
- XmlReader.cs
- DataGridTextBoxColumn.cs
- PasswordBox.cs
- SqlProviderManifest.cs
- TemplateDefinition.cs
- PolyBezierSegment.cs
- ContainerVisual.cs
- PbrsForward.cs
- ClassGenerator.cs
- WindowsEditBox.cs
- AuthenticationModuleElementCollection.cs
- TraceListeners.cs
- DirectoryNotFoundException.cs
- DocumentViewerHelper.cs
- ByteStream.cs
- DrawItemEvent.cs
- UndoEngine.cs
- DocumentGridContextMenu.cs
- IntellisenseTextBox.designer.cs
- UrlAuthFailedErrorFormatter.cs
- TabletDevice.cs
- SafeNativeMethods.cs
- RuntimeConfigurationRecord.cs
- ExtenderHelpers.cs
- RegisteredHiddenField.cs
- CreateUserErrorEventArgs.cs
- ButtonBaseAdapter.cs
- IpcPort.cs
- EndpointDiscoveryMetadata.cs
- Timer.cs
- DataSourceControl.cs
- DbSetClause.cs
- RowToParametersTransformer.cs
- GB18030Encoding.cs
- SamlAuthorizationDecisionClaimResource.cs
- GridViewCancelEditEventArgs.cs
- XamlBrushSerializer.cs
- ChineseLunisolarCalendar.cs
- NameSpaceExtractor.cs
- CompiledAction.cs
- HGlobalSafeHandle.cs
- TickBar.cs
- FormDesigner.cs
- StylusPointProperties.cs
- DataGridViewBand.cs
- DrawingAttributesDefaultValueFactory.cs
- StylusEditingBehavior.cs
- CompoundFileReference.cs
- KeyFrames.cs
- LZCodec.cs
- WebControlToolBoxItem.cs
- UserControlCodeDomTreeGenerator.cs
- TabControl.cs
- ActionFrame.cs
- MenuItemBinding.cs
- SQLInt64.cs
- Panel.cs
- XmlUrlResolver.cs
- SqlDataSource.cs
- CookielessHelper.cs
- AuthStoreRoleProvider.cs
- xamlnodes.cs
- UnaryExpressionHelper.cs