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
- Int32RectConverter.cs
- OleDbConnectionFactory.cs
- JsonMessageEncoderFactory.cs
- GridViewEditEventArgs.cs
- SpanIndex.cs
- InternalsVisibleToAttribute.cs
- CodeDomConfigurationHandler.cs
- IsolatedStoragePermission.cs
- SqlSupersetValidator.cs
- SystemColorTracker.cs
- PopupEventArgs.cs
- TemplatedAdorner.cs
- ThrowHelper.cs
- FileStream.cs
- TypeSystem.cs
- SessionStateUtil.cs
- SafeIUnknown.cs
- NamedPipeTransportManager.cs
- Wildcard.cs
- BackStopAuthenticationModule.cs
- Triplet.cs
- ApplicationHost.cs
- ConfigurationPermission.cs
- ContainsSearchOperator.cs
- SafeRightsManagementSessionHandle.cs
- AppliesToBehaviorDecisionTable.cs
- ToolStripControlHost.cs
- ProfileEventArgs.cs
- InvalidComObjectException.cs
- ProfilePropertySettingsCollection.cs
- ImageSourceValueSerializer.cs
- ColorMap.cs
- StdValidatorsAndConverters.cs
- BufferBuilder.cs
- WebProxyScriptElement.cs
- Polyline.cs
- BindingCollection.cs
- Point3DValueSerializer.cs
- mactripleDES.cs
- OleDbMetaDataFactory.cs
- ObjectListTitleAttribute.cs
- BooleanSwitch.cs
- BitmapEffectInput.cs
- TableProvider.cs
- StringCollection.cs
- ObjectStateEntryDbDataRecord.cs
- UnsafeMethods.cs
- CodeDOMProvider.cs
- UshortList2.cs
- FlowchartDesigner.xaml.cs
- FlowNode.cs
- DataObjectAttribute.cs
- UserNamePasswordServiceCredential.cs
- TreeNodeBinding.cs
- ActivityLocationReferenceEnvironment.cs
- AsyncDataRequest.cs
- CodeTypeReferenceCollection.cs
- EventWaitHandleSecurity.cs
- VirtualPath.cs
- ViewLoader.cs
- VScrollProperties.cs
- TypeConverterAttribute.cs
- BufferedGraphics.cs
- InputProviderSite.cs
- XamlTypeWithExplicitNamespace.cs
- XmlResolver.cs
- XamlWriter.cs
- CharacterMetrics.cs
- ProjectionRewriter.cs
- SiteMapNodeCollection.cs
- Constraint.cs
- GridPattern.cs
- EFDataModelProvider.cs
- CaseInsensitiveHashCodeProvider.cs
- DataGridViewCellParsingEventArgs.cs
- ValidatingReaderNodeData.cs
- ForeignConstraint.cs
- OAVariantLib.cs
- HttpConfigurationSystem.cs
- SelectionEditingBehavior.cs
- AttachedAnnotation.cs
- DynamicValueConverter.cs
- PackageStore.cs
- GlyphRun.cs
- DataFormats.cs
- TdsParameterSetter.cs
- ManagedIStream.cs
- ComplexPropertyEntry.cs
- Selection.cs
- WmlLabelAdapter.cs
- XmlElementAttribute.cs
- base64Transforms.cs
- ToolStripDropDownItemDesigner.cs
- DesignBindingPropertyDescriptor.cs
- DataServiceSaveChangesEventArgs.cs
- XmlCharCheckingReader.cs
- PagerSettings.cs
- SortedDictionary.cs
- WebConvert.cs
- TextProperties.cs