Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumMember.cs / 4 / 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
- DesignerActionItemCollection.cs
- PropertyOverridesTypeEditor.cs
- ColumnClickEvent.cs
- SqlConnectionManager.cs
- RelationshipManager.cs
- XMLUtil.cs
- XmlBoundElement.cs
- Color.cs
- Vector3DValueSerializer.cs
- GridEntry.cs
- WindowsIdentity.cs
- WebServiceClientProxyGenerator.cs
- QilLiteral.cs
- TableCellAutomationPeer.cs
- FigureParagraph.cs
- Knowncolors.cs
- Window.cs
- SamlNameIdentifierClaimResource.cs
- ComPlusInstanceProvider.cs
- WebConfigurationHostFileChange.cs
- Vector3DCollection.cs
- RegistrySecurity.cs
- DocumentViewerBase.cs
- BookmarkManager.cs
- _BaseOverlappedAsyncResult.cs
- CodePropertyReferenceExpression.cs
- TextureBrush.cs
- GPPOINT.cs
- SHA1.cs
- DrawingDrawingContext.cs
- _ProxyChain.cs
- ClientSection.cs
- ContainerVisual.cs
- StreamGeometry.cs
- Drawing.cs
- XmlSchemaObjectTable.cs
- DateTimeFormat.cs
- TransformedBitmap.cs
- _HelperAsyncResults.cs
- RequestCachingSection.cs
- AutoScrollHelper.cs
- ProcessMessagesAsyncResult.cs
- ExtractedStateEntry.cs
- mediapermission.cs
- SimpleBitVector32.cs
- RegexGroupCollection.cs
- PasswordDeriveBytes.cs
- FontStretchConverter.cs
- SerializationInfoEnumerator.cs
- BlockUIContainer.cs
- XmlMemberMapping.cs
- NativeActivityContext.cs
- CharacterHit.cs
- LongTypeConverter.cs
- EmbeddedObject.cs
- Vector3DAnimationBase.cs
- EntryPointNotFoundException.cs
- MetadataArtifactLoaderFile.cs
- EncoderExceptionFallback.cs
- BuiltInExpr.cs
- altserialization.cs
- PropertyItemInternal.cs
- Debug.cs
- UpdateExpressionVisitor.cs
- ObjectDataSourceStatusEventArgs.cs
- TextTreePropertyUndoUnit.cs
- BitmapFrame.cs
- CodeCompiler.cs
- PopupControlService.cs
- WinFormsUtils.cs
- SaveFileDialogDesigner.cs
- AssemblyGen.cs
- CellCreator.cs
- FamilyMapCollection.cs
- WebServiceResponseDesigner.cs
- DecimalStorage.cs
- MimeTypePropertyAttribute.cs
- MessageSecurityOverTcp.cs
- ContextStack.cs
- DrawItemEvent.cs
- ExtensionDataReader.cs
- DeadCharTextComposition.cs
- OrderedEnumerableRowCollection.cs
- WorkflowDebuggerSteppingAttribute.cs
- SoapExtensionStream.cs
- SortKey.cs
- ChannelManager.cs
- Part.cs
- MessageQueueInstaller.cs
- PreviewPageInfo.cs
- arclist.cs
- SmtpFailedRecipientException.cs
- Int32Collection.cs
- HttpCachePolicyElement.cs
- DateTimeFormat.cs
- PageParserFilter.cs
- InvalidOperationException.cs
- NamespaceList.cs
- WindowsFormsLinkLabel.cs
- sqlcontext.cs