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
- ExpressionBuilder.cs
- XamlTypeMapper.cs
- HostingEnvironmentSection.cs
- EntityDataSourceMemberPath.cs
- OletxDependentTransaction.cs
- NameSpaceEvent.cs
- SchemaTypeEmitter.cs
- SQLDateTime.cs
- TreeNode.cs
- ProfileEventArgs.cs
- ViewBase.cs
- XmlValidatingReaderImpl.cs
- TextParagraphCache.cs
- TextBounds.cs
- StreamHelper.cs
- DbMetaDataCollectionNames.cs
- CDSCollectionETWBCLProvider.cs
- ImpersonationContext.cs
- DataExpression.cs
- ResolvedKeyFrameEntry.cs
- SplitterEvent.cs
- DataReaderContainer.cs
- Compiler.cs
- ContextMenu.cs
- ModifierKeysValueSerializer.cs
- SqlGenericUtil.cs
- ReliabilityContractAttribute.cs
- ManifestResourceInfo.cs
- SafeFileMappingHandle.cs
- CoTaskMemHandle.cs
- FileDialog_Vista_Interop.cs
- LinqDataSourceContextData.cs
- MouseDevice.cs
- GeometryDrawing.cs
- DataGridViewAutoSizeModeEventArgs.cs
- StandardOleMarshalObject.cs
- StringArrayEditor.cs
- DateTimePicker.cs
- mongolianshape.cs
- NativeMethods.cs
- StylusShape.cs
- SecurityHelper.cs
- SmtpTransport.cs
- ContainerAction.cs
- MetadataPropertyAttribute.cs
- SchemaCollectionPreprocessor.cs
- PackageRelationship.cs
- EntitySqlQueryState.cs
- WebZone.cs
- GeometryCollection.cs
- SerialPort.cs
- DictionaryContent.cs
- FileLogRecordStream.cs
- ScrollBar.cs
- DbConnectionPoolIdentity.cs
- ToolStripItemClickedEventArgs.cs
- SessionSwitchEventArgs.cs
- TextElementCollection.cs
- Calendar.cs
- TiffBitmapEncoder.cs
- DiagnosticTraceSource.cs
- FtpWebRequest.cs
- PropertyChangeTracker.cs
- InternalResources.cs
- StrongNameMembershipCondition.cs
- WSSecurityPolicy11.cs
- HandoffBehavior.cs
- TypeConverterAttribute.cs
- ContentControl.cs
- ColumnMapVisitor.cs
- HeaderPanel.cs
- OperationResponse.cs
- FlowchartDesignerCommands.cs
- SerializerWriterEventHandlers.cs
- TypeUnloadedException.cs
- XmlBinaryWriterSession.cs
- DebugHandleTracker.cs
- SkewTransform.cs
- ActionFrame.cs
- SHA1CryptoServiceProvider.cs
- _CacheStreams.cs
- HtmlPhoneCallAdapter.cs
- ExtractedStateEntry.cs
- DesignerSerializationOptionsAttribute.cs
- X509IssuerSerialKeyIdentifierClause.cs
- SqlMethodTransformer.cs
- WindowsFont.cs
- Animatable.cs
- WebServiceTypeData.cs
- CompatibleIComparer.cs
- AuthenticateEventArgs.cs
- Listbox.cs
- CompiledIdentityConstraint.cs
- ISessionStateStore.cs
- AssemblyResourceLoader.cs
- FixedPageStructure.cs
- StructuralType.cs
- WebPartExportVerb.cs
- XamlInt32CollectionSerializer.cs
- UInt16.cs