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
- SmtpNetworkElement.cs
- XmlILAnnotation.cs
- BitmapScalingModeValidation.cs
- KeyboardDevice.cs
- PerspectiveCamera.cs
- ModelProperty.cs
- XsdCachingReader.cs
- ResourcePermissionBase.cs
- TabPage.cs
- BamlBinaryReader.cs
- CustomErrorsSection.cs
- DataTableExtensions.cs
- DiffuseMaterial.cs
- HiddenFieldPageStatePersister.cs
- ValidationError.cs
- SimpleTableProvider.cs
- ConfigurationValidatorAttribute.cs
- ExceptionUtil.cs
- CellTreeSimplifier.cs
- FontCacheLogic.cs
- XmlSchemaAnnotation.cs
- querybuilder.cs
- ObjectResult.cs
- InvokePattern.cs
- HttpRequest.cs
- PrintPreviewGraphics.cs
- AmbientLight.cs
- SystemInfo.cs
- ProcessManager.cs
- PathSegment.cs
- UnsafeNetInfoNativeMethods.cs
- HttpValueCollection.cs
- JsonWriter.cs
- DataGridViewCellMouseEventArgs.cs
- ProcessHostMapPath.cs
- BaseEntityWrapper.cs
- DataErrorValidationRule.cs
- ServiceDeploymentInfo.cs
- CellConstant.cs
- _RegBlobWebProxyDataBuilder.cs
- Base64Encoder.cs
- Section.cs
- StringValidatorAttribute.cs
- DesignerCommandAdapter.cs
- BaseEntityWrapper.cs
- InfoCardKeyedHashAlgorithm.cs
- DeobfuscatingStream.cs
- CodeTypeParameter.cs
- invalidudtexception.cs
- ModifierKeysConverter.cs
- GPRECT.cs
- DefaultAuthorizationContext.cs
- CodeCastExpression.cs
- DescriptionAttribute.cs
- IndexedString.cs
- FormConverter.cs
- LayoutSettings.cs
- LazyLoadBehavior.cs
- QueryContinueDragEventArgs.cs
- SqlParameter.cs
- RepeatButton.cs
- EntitySetRetriever.cs
- RemoteWebConfigurationHost.cs
- ResourcesBuildProvider.cs
- PenThreadPool.cs
- WebBrowser.cs
- PersonalizationProviderCollection.cs
- TemplatedEditableDesignerRegion.cs
- CalendarTable.cs
- PathNode.cs
- AsyncOperation.cs
- Point3DCollectionValueSerializer.cs
- hresults.cs
- Permission.cs
- ConnectionStringsExpressionBuilder.cs
- EtwTrackingParticipant.cs
- ChannelProtectionRequirements.cs
- KeyGestureConverter.cs
- Visual3DCollection.cs
- GraphicsPathIterator.cs
- PerformanceCounterManager.cs
- PingOptions.cs
- SynchronizedDispatch.cs
- SocketInformation.cs
- SimpleType.cs
- DesignerLoader.cs
- DelegateHelpers.cs
- FormViewInsertEventArgs.cs
- DataGridViewRowEventArgs.cs
- StorageEndPropertyMapping.cs
- DrawItemEvent.cs
- RectangleHotSpot.cs
- XmlSchemaCompilationSettings.cs
- SoundPlayerAction.cs
- StaticSiteMapProvider.cs
- ServiceBusyException.cs
- StorageEntitySetMapping.cs
- DocumentEventArgs.cs
- ActivityPropertyReference.cs
- ClientSettingsStore.cs