Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlAttributeProperties.cs
- SelectedGridItemChangedEvent.cs
- MembershipSection.cs
- ScaleTransform3D.cs
- LocalizationComments.cs
- OrderedParallelQuery.cs
- EditorZoneBase.cs
- CodeRemoveEventStatement.cs
- PolygonHotSpot.cs
- HitTestWithPointDrawingContextWalker.cs
- SqlCommand.cs
- RequestResponse.cs
- TypefaceMetricsCache.cs
- ConfigurationElementProperty.cs
- HtmlShim.cs
- Activator.cs
- DataControlPagerLinkButton.cs
- ChangePassword.cs
- OracleParameter.cs
- ResourceDictionary.cs
- PeerCollaboration.cs
- Scheduler.cs
- ColorIndependentAnimationStorage.cs
- UInt64.cs
- ResourceSetExpression.cs
- GlyphShapingProperties.cs
- EpmContentSerializerBase.cs
- LambdaReference.cs
- ConfigurationSettings.cs
- MenuCommand.cs
- HtmlInputImage.cs
- DbCommandTree.cs
- WebPartDescription.cs
- XXXInfos.cs
- ScriptRegistrationManager.cs
- ToolStripButton.cs
- RemoteWebConfigurationHostStream.cs
- AppendHelper.cs
- EpmSourceTree.cs
- HttpStreamFormatter.cs
- PropertyTabChangedEvent.cs
- OperationContext.cs
- SolidBrush.cs
- RuntimeDelegateArgument.cs
- DashStyle.cs
- MenuItem.cs
- FixedDocumentPaginator.cs
- AttachedPropertyInfo.cs
- AddInSegmentDirectoryNotFoundException.cs
- BitmapEffectInput.cs
- SmtpReplyReaderFactory.cs
- webeventbuffer.cs
- RunWorkerCompletedEventArgs.cs
- Table.cs
- DPTypeDescriptorContext.cs
- WebContext.cs
- UnSafeCharBuffer.cs
- DataObjectFieldAttribute.cs
- FloatAverageAggregationOperator.cs
- ConfigurationManager.cs
- HttpEncoder.cs
- ForeignConstraint.cs
- Transform.cs
- EnumerableRowCollection.cs
- HttpVersion.cs
- FileInfo.cs
- SystemIPGlobalStatistics.cs
- TargetControlTypeAttribute.cs
- __ConsoleStream.cs
- TreeView.cs
- DragDropManager.cs
- TdsValueSetter.cs
- PixelFormats.cs
- SQLInt64.cs
- IItemProperties.cs
- HttpApplicationFactory.cs
- XmlQueryRuntime.cs
- IgnoreFileBuildProvider.cs
- EncodingNLS.cs
- CustomWebEventKey.cs
- TemplateBaseAction.cs
- OperationResponse.cs
- DLinqTableProvider.cs
- DataGridViewColumnCollectionDialog.cs
- Mappings.cs
- ToolStripOverflowButton.cs
- FileSecurity.cs
- KeyboardDevice.cs
- MenuItem.cs
- ThreadAbortException.cs
- DataGridColumnEventArgs.cs
- GrammarBuilderDictation.cs
- InvariantComparer.cs
- NativeActivityContext.cs
- DoubleLinkList.cs
- XhtmlTextWriter.cs
- RC2.cs
- HtmlControl.cs
- SqlDataSourceDesigner.cs
- CheckBoxAutomationPeer.cs