Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumMember.cs / 2 / 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
- InstanceStore.cs
- BamlTreeUpdater.cs
- Enlistment.cs
- ContentOperations.cs
- HtmlInputSubmit.cs
- CategoryAttribute.cs
- SqlBuffer.cs
- WorkflowRuntimeBehavior.cs
- Stack.cs
- OdbcInfoMessageEvent.cs
- PrintDialogException.cs
- BitmapEffect.cs
- GraphicsContext.cs
- Helper.cs
- WhitespaceRuleLookup.cs
- GrowingArray.cs
- CustomActivityDesigner.cs
- UmAlQuraCalendar.cs
- mediapermission.cs
- SmtpAuthenticationManager.cs
- Win32SafeHandles.cs
- SrgsNameValueTag.cs
- WebDescriptionAttribute.cs
- InitializationEventAttribute.cs
- TcpProcessProtocolHandler.cs
- ExtractedStateEntry.cs
- ImpersonateTokenRef.cs
- WinFormsSecurity.cs
- MethodBuilder.cs
- SafeTimerHandle.cs
- LingerOption.cs
- NonVisualControlAttribute.cs
- EDesignUtil.cs
- MouseButton.cs
- FastPropertyAccessor.cs
- WebPartDisplayModeEventArgs.cs
- ConfigurationElement.cs
- CustomBindingElementCollection.cs
- CodeSnippetStatement.cs
- ResolveCriteriaApril2005.cs
- IPAddressCollection.cs
- AdornedElementPlaceholder.cs
- WebPartExportVerb.cs
- TaiwanCalendar.cs
- ControlPaint.cs
- FileCodeGroup.cs
- PersonalizationProviderCollection.cs
- CodeParameterDeclarationExpression.cs
- ServiceOperationWrapper.cs
- MessageHeaders.cs
- ScopelessEnumAttribute.cs
- FormDocumentDesigner.cs
- SignatureToken.cs
- FindCriteriaCD1.cs
- ServicesUtilities.cs
- FileSystemEventArgs.cs
- LineMetrics.cs
- _NetworkingPerfCounters.cs
- _SecureChannel.cs
- TypographyProperties.cs
- HttpListenerPrefixCollection.cs
- OuterGlowBitmapEffect.cs
- ProfileGroupSettings.cs
- ScrollData.cs
- ColumnWidthChangedEvent.cs
- Visitors.cs
- Rect.cs
- Menu.cs
- ThrowHelper.cs
- RijndaelManaged.cs
- OperatorExpressions.cs
- DiscoveryClientChannelBase.cs
- StrokeNodeEnumerator.cs
- Padding.cs
- AuthenticationModuleElementCollection.cs
- PenLineCapValidation.cs
- SpellerStatusTable.cs
- Content.cs
- XmlArrayAttribute.cs
- FormsIdentity.cs
- HtmlInputText.cs
- QilXmlWriter.cs
- PlatformCulture.cs
- TemplateXamlParser.cs
- StringValidator.cs
- SubpageParagraph.cs
- BookmarkNameHelper.cs
- DocumentViewerAutomationPeer.cs
- DBNull.cs
- ControlEvent.cs
- RelatedPropertyManager.cs
- OutputCacheProfileCollection.cs
- X509Certificate2.cs
- TextMarkerSource.cs
- CodeMemberField.cs
- EmptyReadOnlyDictionaryInternal.cs
- TextBlock.cs
- DataServiceConfiguration.cs
- EmptyEnumerable.cs
- CodeNamespaceImport.cs