Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumMember.cs / 1305376 / EnumMember.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- 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 [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- SHA1.cs
- _TLSstream.cs
- FontUnitConverter.cs
- LicenseProviderAttribute.cs
- OuterGlowBitmapEffect.cs
- SiteMapDataSourceView.cs
- LinkedResourceCollection.cs
- NativeMethodsOther.cs
- SelectorAutomationPeer.cs
- XmlQualifiedNameTest.cs
- ExceptionUtil.cs
- XmlSchemaInferenceException.cs
- ListBoxItemAutomationPeer.cs
- Size3DValueSerializer.cs
- DataPointer.cs
- GiveFeedbackEventArgs.cs
- DotAtomReader.cs
- ResourcePermissionBaseEntry.cs
- HtmlTextArea.cs
- ParserOptions.cs
- UIServiceHelper.cs
- FunctionImportElement.cs
- GridEntry.cs
- WeakRefEnumerator.cs
- _UriTypeConverter.cs
- DataGridColumnCollection.cs
- XmlWriterTraceListener.cs
- ViewSimplifier.cs
- XmlElementList.cs
- XmlQueryOutput.cs
- PostBackOptions.cs
- SqlNotificationEventArgs.cs
- IHttpResponseInternal.cs
- XmlSequenceWriter.cs
- QilGeneratorEnv.cs
- AsymmetricSignatureDeformatter.cs
- UriTemplateMatch.cs
- GenericWebPart.cs
- ProcessThread.cs
- AssemblyAttributes.cs
- ConstructorExpr.cs
- DataServiceQueryProvider.cs
- CodeAttributeDeclaration.cs
- KeyGestureConverter.cs
- OleServicesContext.cs
- FormViewRow.cs
- CharacterMetricsDictionary.cs
- ResXResourceSet.cs
- CanExecuteRoutedEventArgs.cs
- Monitor.cs
- DesignSurfaceEvent.cs
- DecoderFallback.cs
- SqlXml.cs
- OrthographicCamera.cs
- GridViewActionList.cs
- URLString.cs
- StateBag.cs
- BufferedGraphics.cs
- DeviceSpecificChoice.cs
- TransformValueSerializer.cs
- TemplateBindingExtension.cs
- X509Certificate2.cs
- ColorPalette.cs
- Int16KeyFrameCollection.cs
- sqlstateclientmanager.cs
- XmlAtomicValue.cs
- StringDictionaryEditor.cs
- SourceInterpreter.cs
- Msec.cs
- ServiceModelConfigurationElementCollection.cs
- XamlSerializationHelper.cs
- ProvidePropertyAttribute.cs
- SqlError.cs
- UpDownBase.cs
- future.cs
- ThousandthOfEmRealPoints.cs
- LineInfo.cs
- DataObjectMethodAttribute.cs
- SelectionEditor.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ListSortDescriptionCollection.cs
- ConfigUtil.cs
- WindowsToolbarAsMenu.cs
- SudsWriter.cs
- GeneralTransform3DGroup.cs
- Inline.cs
- FastPropertyAccessor.cs
- XmlSerializationWriter.cs
- Inline.cs
- InstallerTypeAttribute.cs
- AsyncCompletedEventArgs.cs
- ParseHttpDate.cs
- ValidationError.cs
- BinaryObjectReader.cs
- FixedSOMTableCell.cs
- PropertyEntry.cs
- FileAuthorizationModule.cs
- _NativeSSPI.cs
- Typeface.cs
- wgx_render.cs