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
- WrapperEqualityComparer.cs
- MsmqIntegrationBindingElement.cs
- ClientRuntime.cs
- SiteOfOriginPart.cs
- InputLanguage.cs
- FrameworkElementFactoryMarkupObject.cs
- XmlSchemaComplexType.cs
- SQLByteStorage.cs
- TypeDescriptionProviderAttribute.cs
- FieldBuilder.cs
- DocumentPageView.cs
- LayoutUtils.cs
- ConditionalBranch.cs
- SQLResource.cs
- BinaryWriter.cs
- DataGridViewColumnCollection.cs
- BoundPropertyEntry.cs
- InternalConfigRoot.cs
- MimeTypeAttribute.cs
- JsonQNameDataContract.cs
- HeaderedItemsControl.cs
- SmtpException.cs
- ErrorTableItemStyle.cs
- StsCommunicationException.cs
- SetIndexBinder.cs
- Ipv6Element.cs
- CatalogPartCollection.cs
- VisualTreeUtils.cs
- Metadata.cs
- ContractInstanceProvider.cs
- _NativeSSPI.cs
- XmlSchemaObject.cs
- XmlDomTextWriter.cs
- Quaternion.cs
- StreamGeometry.cs
- DataList.cs
- CommandField.cs
- XamlRtfConverter.cs
- MessageAction.cs
- CodePageUtils.cs
- ContextMenu.cs
- FileRegion.cs
- Parameter.cs
- StrokeNodeData.cs
- DefaultValueAttribute.cs
- ApplicationDirectory.cs
- XmlSchemaObject.cs
- UrlMappingCollection.cs
- WindowShowOrOpenTracker.cs
- PathGradientBrush.cs
- ClusterSafeNativeMethods.cs
- ComboBox.cs
- BaseUriHelper.cs
- SubordinateTransaction.cs
- SystemThemeKey.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- StickyNoteAnnotations.cs
- XPathDocument.cs
- DropShadowBitmapEffect.cs
- PageParserFilter.cs
- XmlComment.cs
- DetailsViewActionList.cs
- AttributeUsageAttribute.cs
- SecurityDescriptor.cs
- RootProfilePropertySettingsCollection.cs
- MediaSystem.cs
- XappLauncher.cs
- OpCellTreeNode.cs
- TranslateTransform.cs
- RSAPKCS1KeyExchangeFormatter.cs
- Matrix3D.cs
- CodeDomComponentSerializationService.cs
- CqlWriter.cs
- InputScopeNameConverter.cs
- UInt16Converter.cs
- HtmlHead.cs
- DataColumn.cs
- GridView.cs
- ConstrainedDataObject.cs
- QilReference.cs
- Currency.cs
- DataStorage.cs
- PrimitiveXmlSerializers.cs
- SEHException.cs
- X509Utils.cs
- AsyncResult.cs
- AsyncCompletedEventArgs.cs
- XPathDescendantIterator.cs
- AspNetSynchronizationContext.cs
- BookmarkList.cs
- BufferModeSettings.cs
- Descriptor.cs
- StreamWithDictionary.cs
- PageRouteHandler.cs
- PerformanceCounterScope.cs
- StyleModeStack.cs
- ContentElement.cs
- ModelItem.cs
- ContentElement.cs
- ModelItemKeyValuePair.cs