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
- PrintingPermission.cs
- PersonalizationState.cs
- DataGridViewSelectedCellCollection.cs
- CFStream.cs
- DBConcurrencyException.cs
- QilGeneratorEnv.cs
- _FixedSizeReader.cs
- SqlNotificationRequest.cs
- DelegatedStream.cs
- ProcessInputEventArgs.cs
- IODescriptionAttribute.cs
- formatter.cs
- GlyphElement.cs
- WorkflowApplicationAbortedException.cs
- StringSorter.cs
- LoginView.cs
- PreviewControlDesigner.cs
- TableRowCollection.cs
- ScrollEventArgs.cs
- EdmSchemaError.cs
- TimeSpanValidatorAttribute.cs
- ViewManager.cs
- ConfigurationSectionGroup.cs
- AsymmetricSignatureFormatter.cs
- UserUseLicenseDictionaryLoader.cs
- SequentialUshortCollection.cs
- OdbcTransaction.cs
- BitmapEffectGroup.cs
- ImageListDesigner.cs
- DynamicPropertyHolder.cs
- ColorTranslator.cs
- EmptyImpersonationContext.cs
- TransformPattern.cs
- BinaryParser.cs
- GuidelineCollection.cs
- EdgeModeValidation.cs
- FontDifferentiator.cs
- DbXmlEnabledProviderManifest.cs
- IOException.cs
- ActiveXHelper.cs
- EncodingInfo.cs
- HtmlInputFile.cs
- ProviderSettingsCollection.cs
- DataGridViewTextBoxColumn.cs
- ZipPackagePart.cs
- SqlDependencyListener.cs
- SingleConverter.cs
- AuthorizationPolicyTypeElement.cs
- BitmapCodecInfo.cs
- NetTcpSecurity.cs
- FrameworkTemplate.cs
- TreeViewAutomationPeer.cs
- ObjectSet.cs
- ObjectDataSourceSelectingEventArgs.cs
- CommentEmitter.cs
- ColumnMapCopier.cs
- ECDsa.cs
- DataGridViewTopRowAccessibleObject.cs
- ZoneIdentityPermission.cs
- TemplateControlParser.cs
- Visual3D.cs
- ValidatingReaderNodeData.cs
- RawStylusInputCustomDataList.cs
- EncodingNLS.cs
- DataServiceHostWrapper.cs
- _DigestClient.cs
- RC2CryptoServiceProvider.cs
- SqlErrorCollection.cs
- ChangeBlockUndoRecord.cs
- ContentControl.cs
- WmlTextViewAdapter.cs
- ColumnResult.cs
- Aes.cs
- TypeInitializationException.cs
- SystemColors.cs
- _DigestClient.cs
- SqlClientFactory.cs
- ColorAnimationBase.cs
- HwndAppCommandInputProvider.cs
- ExtendedProtectionPolicyElement.cs
- SoapSchemaMember.cs
- DirectoryObjectSecurity.cs
- ProviderConnectionPoint.cs
- MD5CryptoServiceProvider.cs
- DynamicDocumentPaginator.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- BufferModeSettings.cs
- PersianCalendar.cs
- SelectionProviderWrapper.cs
- ScrollPattern.cs
- PointLightBase.cs
- ContainerActivationHelper.cs
- HtmlShimManager.cs
- DesignerHierarchicalDataSourceView.cs
- GZipStream.cs
- Update.cs
- VisualBrush.cs
- ConfigurationStrings.cs
- XmlAnyElementAttribute.cs
- WebConfigurationHostFileChange.cs