Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / EntityDataSourceEntitySetNameItem.cs / 3 / EntityDataSourceEntitySetNameItem.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System.Data.Metadata.Edm; namespace System.Web.UI.Design.WebControls { internal class EntityDataSourceEntitySetNameItem : 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 EntitySet _entitySet; // used when we have a real EntitySet backing this item private readonly string _unknownEntitySetName; // used when we have an unknown EntitySetName that we still want to include in the list internal EntityDataSourceEntitySetNameItem(EntitySet entitySet) { _entitySet = entitySet; } internal EntityDataSourceEntitySetNameItem(string unknownEntitySetName) { _unknownEntitySetName = unknownEntitySetName; } internal string EntitySetName { get { if (_entitySet != null) { return _entitySet.Name; } else { return _unknownEntitySetName; } } } internal EntitySet EntitySet { get { return _entitySet; } } public override string ToString() { return EntitySetName; } int IComparable .CompareTo(EntityDataSourceEntitySetNameItem other) { return (String.Compare(this.EntitySetName, other.EntitySetName, 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 EntityDataSourceEntitySetNameItem : 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 EntitySet _entitySet; // used when we have a real EntitySet backing this item private readonly string _unknownEntitySetName; // used when we have an unknown EntitySetName that we still want to include in the list internal EntityDataSourceEntitySetNameItem(EntitySet entitySet) { _entitySet = entitySet; } internal EntityDataSourceEntitySetNameItem(string unknownEntitySetName) { _unknownEntitySetName = unknownEntitySetName; } internal string EntitySetName { get { if (_entitySet != null) { return _entitySet.Name; } else { return _unknownEntitySetName; } } } internal EntitySet EntitySet { get { return _entitySet; } } public override string ToString() { return EntitySetName; } int IComparable .CompareTo(EntityDataSourceEntitySetNameItem other) { return (String.Compare(this.EntitySetName, other.EntitySetName, 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
- ContextStack.cs
- NestPullup.cs
- WebPartUtil.cs
- ErrorHandlerModule.cs
- MulticastDelegate.cs
- TransactionManager.cs
- CompilerGlobalScopeAttribute.cs
- StdValidatorsAndConverters.cs
- ResourcePermissionBase.cs
- ImageIndexConverter.cs
- OleDbErrorCollection.cs
- EntityDataSourceConfigureObjectContext.cs
- DataGridParentRows.cs
- LocalizableResourceBuilder.cs
- PagesSection.cs
- PlanCompiler.cs
- Vars.cs
- AbstractDataSvcMapFileLoader.cs
- NativeMethods.cs
- SpecialNameAttribute.cs
- SyndicationFeedFormatter.cs
- DataGridRowHeader.cs
- RoutedEventHandlerInfo.cs
- DesigntimeLicenseContext.cs
- TouchEventArgs.cs
- Crc32Helper.cs
- WebBrowsableAttribute.cs
- KeySplineConverter.cs
- ImageDrawing.cs
- SourceFilter.cs
- ExpressionBuilderContext.cs
- ToolStripDropDownButton.cs
- InvokeSchedule.cs
- NameValueSectionHandler.cs
- XmlQualifiedName.cs
- cryptoapiTransform.cs
- CollectionView.cs
- FileDialog.cs
- PathSegment.cs
- ScriptingSectionGroup.cs
- ArgIterator.cs
- ReliableSession.cs
- UrlMappingsModule.cs
- Calendar.cs
- EdmScalarPropertyAttribute.cs
- WebBrowserPermission.cs
- MemberAccessException.cs
- StyleSelector.cs
- BCLDebug.cs
- RegexCompiler.cs
- CaseStatement.cs
- MatrixStack.cs
- User.cs
- Exception.cs
- WindowsGrip.cs
- Utilities.cs
- CategoryAttribute.cs
- PipelineDeploymentState.cs
- Grammar.cs
- XmlCharType.cs
- FixUp.cs
- TokenBasedSet.cs
- GroupItem.cs
- ExpanderAutomationPeer.cs
- ResXBuildProvider.cs
- ColorInterpolationModeValidation.cs
- Expr.cs
- LightweightCodeGenerator.cs
- ComAdminInterfaces.cs
- ExpressionVisitorHelpers.cs
- ProtocolsConfigurationHandler.cs
- RightsManagementEncryptedStream.cs
- ContextMenuStripActionList.cs
- NonDualMessageSecurityOverHttp.cs
- TraceData.cs
- TreeNodeConverter.cs
- StickyNoteHelper.cs
- XmlPreloadedResolver.cs
- DiscoveryDocumentSearchPattern.cs
- Switch.cs
- SQLBytesStorage.cs
- SqlConnectionHelper.cs
- CompilerGlobalScopeAttribute.cs
- HebrewCalendar.cs
- Item.cs
- ObjectListField.cs
- CapiSafeHandles.cs
- webbrowsersite.cs
- FormViewPagerRow.cs
- RequestQueryProcessor.cs
- HierarchicalDataSourceControl.cs
- COMException.cs
- XmlDocumentViewSchema.cs
- TextServicesDisplayAttribute.cs
- Comparer.cs
- BatchParser.cs
- SizeIndependentAnimationStorage.cs
- AxParameterData.cs
- DataGridViewTextBoxEditingControl.cs
- DataGridViewDataConnection.cs