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
- SqlPersonalizationProvider.cs
- WorkflowLayouts.cs
- SupportingTokenBindingElement.cs
- StubHelpers.cs
- SimpleBitVector32.cs
- ConsoleCancelEventArgs.cs
- TTSEngineProxy.cs
- BaseValidatorDesigner.cs
- CommandField.cs
- XpsSerializationManager.cs
- OptimalBreakSession.cs
- GenericUriParser.cs
- CreateUserWizardStep.cs
- TextAction.cs
- FillBehavior.cs
- SubtreeProcessor.cs
- MetadataProperty.cs
- DataQuery.cs
- Operator.cs
- AssemblyBuilderData.cs
- LocalServiceSecuritySettingsElement.cs
- FacetChecker.cs
- CommonBehaviorsSection.cs
- DataGridViewDataErrorEventArgs.cs
- IteratorDescriptor.cs
- PassportAuthentication.cs
- DesignerWebPartChrome.cs
- TypeLoadException.cs
- DecimalAnimation.cs
- GroupBoxAutomationPeer.cs
- RemotingConfigParser.cs
- InstanceCollisionException.cs
- PagesSection.cs
- SpecialTypeDataContract.cs
- ScriptModule.cs
- FixedFindEngine.cs
- StreamedWorkflowDefinitionContext.cs
- Graphics.cs
- EntityWrapper.cs
- _DigestClient.cs
- ContainerControl.cs
- BufferedGraphicsManager.cs
- XmlParserContext.cs
- DataGridHeaderBorder.cs
- QueueProcessor.cs
- EventLogPermission.cs
- ContentType.cs
- BuilderPropertyEntry.cs
- SecurityTokenResolver.cs
- Util.cs
- PenThreadPool.cs
- PointHitTestResult.cs
- MatrixTransform.cs
- Reference.cs
- OutgoingWebRequestContext.cs
- ThemeInfoAttribute.cs
- Properties.cs
- DocumentSchemaValidator.cs
- GeometryCombineModeValidation.cs
- Border.cs
- TableCell.cs
- XPathDescendantIterator.cs
- FileDialogPermission.cs
- TextStore.cs
- UnsafeNativeMethods.cs
- PageAdapter.cs
- SubqueryRules.cs
- SmtpTransport.cs
- DateTimeUtil.cs
- FreezableOperations.cs
- View.cs
- ModuleConfigurationInfo.cs
- DesignerActionGlyph.cs
- LinkLabel.cs
- ScriptHandlerFactory.cs
- SafeThreadHandle.cs
- Atom10FeedFormatter.cs
- HtmlInputText.cs
- HashCodeCombiner.cs
- BaseParagraph.cs
- ToolStripPanelRow.cs
- MarkupExtensionParser.cs
- QuaternionKeyFrameCollection.cs
- LocatorPartList.cs
- TableHeaderCell.cs
- MatrixKeyFrameCollection.cs
- ObjectConverter.cs
- LinkButton.cs
- FileRecordSequenceCompletedAsyncResult.cs
- SQLUtility.cs
- SecUtil.cs
- XmlTextWriter.cs
- CallbackDebugElement.cs
- TableRowGroup.cs
- SimpleType.cs
- SiteMapDesignerDataSourceView.cs
- SafeNativeMemoryHandle.cs
- CompiledXpathExpr.cs
- OperationAbortedException.cs
- XhtmlStyleClass.cs