Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumMember.cs / 1 / 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
- DatagramAdapter.cs
- PartialCachingControl.cs
- processwaithandle.cs
- TextEffectResolver.cs
- UInt64Storage.cs
- GridToolTip.cs
- AvtEvent.cs
- TabControlCancelEvent.cs
- InvokeProviderWrapper.cs
- SystemTcpConnection.cs
- ButtonBaseAdapter.cs
- QualifierSet.cs
- XmlObjectSerializer.cs
- CodeStatement.cs
- HealthMonitoringSection.cs
- DLinqAssociationProvider.cs
- TableRowCollection.cs
- SafeNativeMethods.cs
- DataObjectMethodAttribute.cs
- _LoggingObject.cs
- sitestring.cs
- Page.cs
- TargetParameterCountException.cs
- ValidatorCompatibilityHelper.cs
- GridViewAutomationPeer.cs
- ViewStateChangedEventArgs.cs
- CodePageUtils.cs
- HttpResponseBase.cs
- Container.cs
- _UriSyntax.cs
- SessionStateSection.cs
- MediaPlayerState.cs
- ProcessModelInfo.cs
- TextSelectionProcessor.cs
- DefaultPrintController.cs
- EndpointIdentityExtension.cs
- StaticTextPointer.cs
- ErrorsHelper.cs
- MenuEventArgs.cs
- ResourceDescriptionAttribute.cs
- PackageRelationshipCollection.cs
- IImplicitResourceProvider.cs
- DbProviderFactoriesConfigurationHandler.cs
- ConfigurationErrorsException.cs
- InfoCardArgumentException.cs
- DataSourceControl.cs
- MissingMemberException.cs
- DefaultHttpHandler.cs
- RequestCacheValidator.cs
- TablePatternIdentifiers.cs
- ConditionCollection.cs
- CodeTypeParameterCollection.cs
- HttpFileCollection.cs
- CultureInfoConverter.cs
- Debug.cs
- CqlWriter.cs
- GZipStream.cs
- DoubleCollectionConverter.cs
- InfocardClientCredentials.cs
- HTMLTagNameToTypeMapper.cs
- ContextDataSourceContextData.cs
- EntityDataSourceContextCreatingEventArgs.cs
- SqlClientFactory.cs
- WebPartTransformerCollection.cs
- MutableAssemblyCacheEntry.cs
- XsltCompileContext.cs
- precedingquery.cs
- TraceLevelStore.cs
- TextEditorLists.cs
- CompositeActivityMarkupSerializer.cs
- RootProfilePropertySettingsCollection.cs
- XmlSerializableServices.cs
- CompressionTransform.cs
- DataGridViewCheckBoxCell.cs
- UInt32Converter.cs
- GridErrorDlg.cs
- ServiceOperation.cs
- AdapterDictionary.cs
- ControlSerializer.cs
- ReadOnlyTernaryTree.cs
- StructuredTypeEmitter.cs
- StatusStrip.cs
- CollectionViewGroupInternal.cs
- TypeToken.cs
- SqlSupersetValidator.cs
- SizeValueSerializer.cs
- Thumb.cs
- ConstructorExpr.cs
- SynchronousChannelMergeEnumerator.cs
- Ray3DHitTestResult.cs
- DataGridComponentEditor.cs
- ProxyManager.cs
- SafeEventHandle.cs
- OracleRowUpdatingEventArgs.cs
- DocumentStream.cs
- PrePrepareMethodAttribute.cs
- SupportingTokenListenerFactory.cs
- GeometryValueSerializer.cs
- PnrpPermission.cs
- ColorDialog.cs