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
- Image.cs
- WebPartChrome.cs
- EventLogPermissionEntryCollection.cs
- CompositeFontFamily.cs
- OptimizerPatterns.cs
- BitmapEffectState.cs
- DataControlCommands.cs
- BypassElement.cs
- MenuItem.cs
- TempFiles.cs
- NotFiniteNumberException.cs
- HttpApplication.cs
- TargetParameterCountException.cs
- ArglessEventHandlerProxy.cs
- GPRECTF.cs
- ValidatingPropertiesEventArgs.cs
- OleServicesContext.cs
- SpotLight.cs
- CallbackWrapper.cs
- BitmapEffect.cs
- SqlMethodTransformer.cs
- TextParagraph.cs
- OverflowException.cs
- ConfigXmlComment.cs
- IsolatedStoragePermission.cs
- DataGrid.cs
- FunctionQuery.cs
- BaseCodeDomTreeGenerator.cs
- TaskDesigner.cs
- WebPermission.cs
- BmpBitmapEncoder.cs
- ScrollProviderWrapper.cs
- MissingManifestResourceException.cs
- DynamicMetaObject.cs
- RegexCompilationInfo.cs
- CheckBoxList.cs
- TaskFileService.cs
- SingleObjectCollection.cs
- PipeStream.cs
- WorkflowDefinitionContext.cs
- UMPAttributes.cs
- XmlSerializerNamespaces.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- SmtpFailedRecipientsException.cs
- LingerOption.cs
- DeclarationUpdate.cs
- ImageField.cs
- LinqDataSourceEditData.cs
- Random.cs
- XPathNavigator.cs
- HuffCodec.cs
- PropertyTabChangedEvent.cs
- ContentFileHelper.cs
- CompressEmulationStream.cs
- dsa.cs
- DeleteWorkflowOwnerCommand.cs
- RoleProviderPrincipal.cs
- View.cs
- TimelineCollection.cs
- MessageEncoderFactory.cs
- CatalogPartCollection.cs
- WindowsTooltip.cs
- PathTooLongException.cs
- TypeDescriptionProvider.cs
- ModelPropertyCollectionImpl.cs
- localization.cs
- MatrixStack.cs
- NumericExpr.cs
- TextElementEnumerator.cs
- EastAsianLunisolarCalendar.cs
- TraceContextRecord.cs
- IPHostEntry.cs
- OpenFileDialog.cs
- Pool.cs
- DiffuseMaterial.cs
- FontDialog.cs
- XsdBuilder.cs
- XPathItem.cs
- BooleanToVisibilityConverter.cs
- PageAsyncTaskManager.cs
- SerialPort.cs
- ButtonBaseAdapter.cs
- UrlUtility.cs
- DataGridClipboardHelper.cs
- DataGridrowEditEndingEventArgs.cs
- ActivityDesigner.cs
- ChangeBlockUndoRecord.cs
- SharedPerformanceCounter.cs
- UrlPropertyAttribute.cs
- StringToken.cs
- NativeMethods.cs
- AutomationProperties.cs
- Stack.cs
- Win32SafeHandles.cs
- RuleSetDialog.cs
- MetadataCollection.cs
- WizardStepCollectionEditor.cs
- SettingsProviderCollection.cs
- DataSourceProvider.cs
- DataControlFieldHeaderCell.cs