Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumMember.cs / 4 / EnumMember.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Data.Common; using System.Text; namespace System.Data.Metadata.Edm { ////// Class representing a enumeration value /// internal sealed class EnumMember : MetadataItem { #region Constructors ////// The constructor for EnumMember. It takes the required information to identify this enumeration member. /// /// The name of this enumeration member ///Thrown if name argument is null ///Thrown if name argument is empty string internal EnumMember(string name) :base(MetadataFlags.Readonly) { EntityUtil.CheckStringArgument(name, "name"); _name = name; } #endregion #region Fields private readonly string _name; #endregion #region Properties ////// Returns the kind of the type /// public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.EnumMember; } } ////// Returns the name of the EnumMember /// ///Thrown if value passed into setter is null ///Thrown if the EnumMember instance is in ReadOnly state [MetadataProperty(PrimitiveTypeKind.String, false)] public String Name { get { return _name; } } ////// Gets the identity for this item as a string /// internal override string Identity { get { return this.Name; } } ////// Overriding System.Object.ToString to provide better String representation /// for this type. /// public override string ToString() { return Name; } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Data.Common; using System.Text; namespace System.Data.Metadata.Edm { ////// Class representing a enumeration value /// internal sealed class EnumMember : MetadataItem { #region Constructors ////// The constructor for EnumMember. It takes the required information to identify this enumeration member. /// /// The name of this enumeration member ///Thrown if name argument is null ///Thrown if name argument is empty string internal EnumMember(string name) :base(MetadataFlags.Readonly) { EntityUtil.CheckStringArgument(name, "name"); _name = name; } #endregion #region Fields private readonly string _name; #endregion #region Properties ////// Returns the kind of the type /// public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.EnumMember; } } ////// Returns the name of the EnumMember /// ///Thrown if value passed into setter is null ///Thrown if the EnumMember instance is in ReadOnly state [MetadataProperty(PrimitiveTypeKind.String, false)] public String Name { get { return _name; } } ////// Gets the identity for this item as a string /// internal override string Identity { get { return this.Name; } } ////// Overriding System.Object.ToString to provide better String representation /// for this type. /// public override string ToString() { return Name; } #endregion } } // 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
- CommonDialog.cs
- AsyncWaitHandle.cs
- RightsManagementEncryptedStream.cs
- OdbcErrorCollection.cs
- MultidimensionalArrayItemReference.cs
- FlowNode.cs
- ConfigUtil.cs
- DisplayNameAttribute.cs
- SafeNativeMethods.cs
- System.Data_BID.cs
- XmlUrlEditor.cs
- TcpClientChannel.cs
- DocumentViewerAutomationPeer.cs
- CredentialCache.cs
- HttpApplicationFactory.cs
- CSharpCodeProvider.cs
- WebServiceTypeData.cs
- MatrixAnimationUsingPath.cs
- HwndMouseInputProvider.cs
- DataGridColumnHeaderAutomationPeer.cs
- EntityViewContainer.cs
- MobileResource.cs
- CLSCompliantAttribute.cs
- XmlSchemaType.cs
- ProcessThread.cs
- DesignBindingConverter.cs
- SchemaImporterExtensionElementCollection.cs
- MsdtcClusterUtils.cs
- ListItemsPage.cs
- CacheManager.cs
- FileController.cs
- DbConnectionPoolGroup.cs
- URLBuilder.cs
- BStrWrapper.cs
- DataGridViewToolTip.cs
- DataReaderContainer.cs
- BitmapCacheBrush.cs
- TrackingMemoryStreamFactory.cs
- ResponseStream.cs
- ClonableStack.cs
- XmlSiteMapProvider.cs
- ImportedNamespaceContextItem.cs
- TabItemAutomationPeer.cs
- TypeTypeConverter.cs
- XmlSchemaAttributeGroupRef.cs
- ColumnHeaderConverter.cs
- FolderBrowserDialog.cs
- ItemType.cs
- LicenseException.cs
- ProvidePropertyAttribute.cs
- AssemblyBuilder.cs
- GetWinFXPath.cs
- TableRowGroup.cs
- RectangleHotSpot.cs
- FormatVersion.cs
- FormClosedEvent.cs
- BitmapEffectInput.cs
- SiteMapDataSource.cs
- GeometryValueSerializer.cs
- DataGridViewDesigner.cs
- Decimal.cs
- MemberInfoSerializationHolder.cs
- EmbeddedMailObjectCollectionEditor.cs
- WsdlInspector.cs
- DataException.cs
- HtmlInputText.cs
- CompilationUnit.cs
- XPathMultyIterator.cs
- GlobalizationSection.cs
- QuaternionKeyFrameCollection.cs
- _DomainName.cs
- LineGeometry.cs
- MenuTracker.cs
- EmptyEnumerator.cs
- DataGridRowAutomationPeer.cs
- ObsoleteAttribute.cs
- PathTooLongException.cs
- VBIdentifierName.cs
- TemplateComponentConnector.cs
- WebPart.cs
- ShaderEffect.cs
- LineServicesCallbacks.cs
- Triplet.cs
- TdsParserSafeHandles.cs
- CardSpacePolicyElement.cs
- AutoFocusStyle.xaml.cs
- Pointer.cs
- METAHEADER.cs
- LinkedResource.cs
- StreamingContext.cs
- ServiceDescription.cs
- PeerNearMe.cs
- OperatorExpressions.cs
- TextDecorationLocationValidation.cs
- PagedDataSource.cs
- RegistrationServices.cs
- CodeTypeDeclarationCollection.cs
- XmlStringTable.cs
- SHA384.cs
- Vector3D.cs