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
- IImplicitResourceProvider.cs
- WorkflowElementDialogWindow.xaml.cs
- DataServiceRequestOfT.cs
- LocalizedNameDescriptionPair.cs
- StyleCollection.cs
- Point3DConverter.cs
- SiteMapDataSource.cs
- GridView.cs
- BasicKeyConstraint.cs
- SqlProfileProvider.cs
- ControlParameter.cs
- ChannelFactoryBase.cs
- Not.cs
- EmptyStringExpandableObjectConverter.cs
- Gdiplus.cs
- DispatcherHookEventArgs.cs
- ScriptHandlerFactory.cs
- OrCondition.cs
- ClosableStream.cs
- BitmapEffectRenderDataResource.cs
- DecimalStorage.cs
- WebEvents.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- ContentPropertyAttribute.cs
- contentDescriptor.cs
- ContentElement.cs
- PasswordTextContainer.cs
- XmlBindingWorker.cs
- EventTrigger.cs
- ConstraintStruct.cs
- RegexFCD.cs
- SEHException.cs
- CompareInfo.cs
- Pkcs7Recipient.cs
- SqlCommandAsyncResult.cs
- TraceListener.cs
- ImportCatalogPart.cs
- Error.cs
- TextSearch.cs
- DecoderNLS.cs
- ReferencedCollectionType.cs
- CodeSubDirectoriesCollection.cs
- FromReply.cs
- SamlAuthorityBinding.cs
- AtomicFile.cs
- ClientConfigPaths.cs
- Container.cs
- ObjectStateEntry.cs
- DynamicILGenerator.cs
- XPathParser.cs
- ReplyAdapterChannelListener.cs
- AggregateException.cs
- LocalizationParserHooks.cs
- ComboBox.cs
- basecomparevalidator.cs
- LoadGrammarCompletedEventArgs.cs
- WorkflowRuntimeService.cs
- ImageClickEventArgs.cs
- MarkupObject.cs
- SoapAttributeAttribute.cs
- _Events.cs
- WebPartsPersonalizationAuthorization.cs
- ValidationErrorCollection.cs
- ObjectKeyFrameCollection.cs
- XmlSubtreeReader.cs
- CryptoProvider.cs
- DataTableClearEvent.cs
- Rule.cs
- TextAction.cs
- CheckBoxField.cs
- BaseParaClient.cs
- QualifiedCellIdBoolean.cs
- SqlSelectStatement.cs
- DataGridDesigner.cs
- GenerateScriptTypeAttribute.cs
- DataGridViewBand.cs
- XmlSchemaCompilationSettings.cs
- XmlILTrace.cs
- Guid.cs
- ExtendedPropertyInfo.cs
- NavigationPropertyAccessor.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- XmlSchemaException.cs
- QilLiteral.cs
- FtpWebRequest.cs
- RegistrySecurity.cs
- Matrix.cs
- XmlSchemaGroup.cs
- counter.cs
- MergeFailedEvent.cs
- Span.cs
- WebPartConnection.cs
- DeviceContexts.cs
- SystemUnicastIPAddressInformation.cs
- EntityDataSourceViewSchema.cs
- KeyValuePairs.cs
- ArrayList.cs
- NoneExcludedImageIndexConverter.cs
- LiteralSubsegment.cs
- PermissionSetTriple.cs