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
- DataTableMapping.cs
- BindingsCollection.cs
- UnmanagedBitmapWrapper.cs
- UnitySerializationHolder.cs
- RealProxy.cs
- EntityProxyTypeInfo.cs
- AutomationPropertyInfo.cs
- DebuggerAttributes.cs
- SqlFunctionAttribute.cs
- ConfigurationElementCollection.cs
- MimeTypeMapper.cs
- RuntimeHelpers.cs
- Recipient.cs
- SiteMapDataSource.cs
- Int32Converter.cs
- RelationshipConstraintValidator.cs
- NavigatorInput.cs
- PropertyGeneratedEventArgs.cs
- JapaneseLunisolarCalendar.cs
- Message.cs
- InheritanceAttribute.cs
- ZoneLinkButton.cs
- DoubleAnimationUsingPath.cs
- DocumentXPathNavigator.cs
- WorkflowOperationAsyncResult.cs
- NameTable.cs
- PolicyUtility.cs
- RegexNode.cs
- PeerIPHelper.cs
- TextServicesManager.cs
- TargetInvocationException.cs
- QueryOutputWriter.cs
- ZipFileInfo.cs
- DataGridColumnHeader.cs
- OverrideMode.cs
- PackageRelationshipSelector.cs
- SecurityPermission.cs
- DrawToolTipEventArgs.cs
- UrlRoutingModule.cs
- CustomCategoryAttribute.cs
- DependentList.cs
- CompositeScriptReferenceEventArgs.cs
- Events.cs
- TextContainer.cs
- RuntimeHelpers.cs
- MetricEntry.cs
- XmlSchemaObject.cs
- DataControlFieldCollection.cs
- PageThemeCodeDomTreeGenerator.cs
- DataKey.cs
- TraceHandlerErrorFormatter.cs
- safelinkcollection.cs
- UIHelper.cs
- OleStrCAMarshaler.cs
- Nodes.cs
- SQLInt64Storage.cs
- NullableConverter.cs
- NativeMethods.cs
- RootProfilePropertySettingsCollection.cs
- CodeIndexerExpression.cs
- DbTypeMap.cs
- OdbcConnectionPoolProviderInfo.cs
- SecurityToken.cs
- CustomWebEventKey.cs
- MeasurementDCInfo.cs
- EventProviderTraceListener.cs
- SliderAutomationPeer.cs
- Nodes.cs
- UriScheme.cs
- XslException.cs
- CookieHandler.cs
- AuthorizationSection.cs
- QueryOutputWriter.cs
- ACL.cs
- SafeNativeMethodsCLR.cs
- IndexingContentUnit.cs
- LocalizationParserHooks.cs
- SchemaCollectionCompiler.cs
- ItemsControlAutomationPeer.cs
- BrowserCapabilitiesFactoryBase.cs
- WebScriptMetadataMessageEncoderFactory.cs
- AutoResetEvent.cs
- WmlControlAdapter.cs
- AuthenticationConfig.cs
- CodeCommentStatement.cs
- SelectedDatesCollection.cs
- HeaderCollection.cs
- ExpressionSelection.cs
- ScrollViewer.cs
- PartialCachingAttribute.cs
- UdpDuplexChannel.cs
- EDesignUtil.cs
- OrderPreservingPipeliningSpoolingTask.cs
- StrokeNode.cs
- InvalidCommandTreeException.cs
- XmlnsDictionary.cs
- RequestCachePolicyConverter.cs
- PageCodeDomTreeGenerator.cs
- TdsParserStaticMethods.cs
- XmlElementAttributes.cs