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
- XPathNodeIterator.cs
- XmlExpressionDumper.cs
- CustomExpressionEventArgs.cs
- SchemaImporter.cs
- ResourceAttributes.cs
- SchemaCollectionPreprocessor.cs
- TypefaceMetricsCache.cs
- BitmapEffectDrawingContextState.cs
- TableStyle.cs
- MediaPlayerState.cs
- XDRSchema.cs
- Constants.cs
- AbsoluteQuery.cs
- AppModelKnownContentFactory.cs
- HttpHandlerAction.cs
- CommandManager.cs
- TransformerConfigurationWizardBase.cs
- FileDataSource.cs
- HotSpotCollection.cs
- DataServiceQuery.cs
- DetailsViewModeEventArgs.cs
- CodeDelegateInvokeExpression.cs
- NumericPagerField.cs
- ParserHooks.cs
- ColorMap.cs
- unsafeIndexingFilterStream.cs
- PolicyStatement.cs
- EdmItemError.cs
- CssClassPropertyAttribute.cs
- QueueProcessor.cs
- EntityTypeEmitter.cs
- HttpResponseHeader.cs
- ViewManagerAttribute.cs
- PenThread.cs
- AsymmetricKeyExchangeFormatter.cs
- CodeRegionDirective.cs
- FixedSOMLineCollection.cs
- DocumentStream.cs
- XmlTypeAttribute.cs
- CollectionViewGroupInternal.cs
- HwndSourceKeyboardInputSite.cs
- BuildManagerHost.cs
- ParserOptions.cs
- XmlSchemaRedefine.cs
- DropShadowBitmapEffect.cs
- shaperfactoryquerycacheentry.cs
- PerformanceCounterLib.cs
- DataGrid.cs
- RootDesignerSerializerAttribute.cs
- DiscoveryInnerClientManaged11.cs
- ContentType.cs
- WebServiceTypeData.cs
- WebPartTransformerCollection.cs
- MSAANativeProvider.cs
- CodeTypeParameter.cs
- WebPartCatalogAddVerb.cs
- InvalidEnumArgumentException.cs
- SafeNativeMethods.cs
- AnimatedTypeHelpers.cs
- Renderer.cs
- CategoryNameCollection.cs
- StringDictionary.cs
- StorageEntitySetMapping.cs
- MarkupCompilePass2.cs
- ThreadInterruptedException.cs
- ContainerActivationHelper.cs
- RegisteredExpandoAttribute.cs
- HandlerBase.cs
- CheckBoxAutomationPeer.cs
- ClientConfigPaths.cs
- XmlSerializerVersionAttribute.cs
- SiteMapHierarchicalDataSourceView.cs
- XamlTypeMapperSchemaContext.cs
- DesignerGenericWebPart.cs
- HttpListenerException.cs
- RelationshipNavigation.cs
- TextOnlyOutput.cs
- AddingNewEventArgs.cs
- ServiceMetadataContractBehavior.cs
- TableCellCollection.cs
- RedirectionProxy.cs
- MdImport.cs
- SelectionPatternIdentifiers.cs
- ResourceSet.cs
- DataGridViewCheckBoxColumn.cs
- CompositeDataBoundControl.cs
- KeyValueSerializer.cs
- CharacterMetrics.cs
- SigningCredentials.cs
- SByteStorage.cs
- FixedHighlight.cs
- WebBrowserHelper.cs
- MenuRendererStandards.cs
- Point3DCollection.cs
- SqlDataSourceConfigureSelectPanel.cs
- CodeNamespaceImportCollection.cs
- XsltQilFactory.cs
- TextEffectResolver.cs
- AttributeAction.cs
- SoapReflectionImporter.cs