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
- SqlStatistics.cs
- QilParameter.cs
- ListViewItem.cs
- StringToken.cs
- TextElement.cs
- ExecutedRoutedEventArgs.cs
- DataConnectionHelper.cs
- DateTimeConverter.cs
- Codec.cs
- VirtualizingStackPanel.cs
- HttpClientCertificate.cs
- DefaultShape.cs
- WebPartDisplayModeCancelEventArgs.cs
- PerformanceCounterLib.cs
- XmlResolver.cs
- AmbientProperties.cs
- MenuItemCollection.cs
- ProtectedUri.cs
- CopyAction.cs
- CultureSpecificStringDictionary.cs
- PermissionAttributes.cs
- AnnotationAdorner.cs
- ScrollViewer.cs
- LambdaCompiler.Lambda.cs
- ClusterUtils.cs
- XsltLibrary.cs
- TaiwanCalendar.cs
- StyleSheet.cs
- DefaultValidator.cs
- XmlSchemaObjectCollection.cs
- StateManagedCollection.cs
- ListChangedEventArgs.cs
- TextEditorTyping.cs
- GridViewAutoFormat.cs
- ResourcePermissionBaseEntry.cs
- XmlCharType.cs
- FaultFormatter.cs
- xmlfixedPageInfo.cs
- PartialCachingAttribute.cs
- Empty.cs
- DebugView.cs
- Model3D.cs
- DeclarativeConditionsCollection.cs
- ButtonBase.cs
- BinaryNode.cs
- PeerMaintainer.cs
- ConsoleTraceListener.cs
- EntityDataSourceSelectedEventArgs.cs
- DataGridViewCellLinkedList.cs
- ContextMenuAutomationPeer.cs
- PermissionToken.cs
- GeneralTransform3D.cs
- SoapObjectWriter.cs
- FrameSecurityDescriptor.cs
- TrustManagerPromptUI.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- BamlVersionHeader.cs
- CollectionViewProxy.cs
- ScrollBar.cs
- ServicePerformanceCounters.cs
- followingsibling.cs
- InstanceOwner.cs
- LazyTextWriterCreator.cs
- TransactionBridge.cs
- XpsPartBase.cs
- DisplayMemberTemplateSelector.cs
- ConstraintEnumerator.cs
- HandlerBase.cs
- ControlParameter.cs
- JsonDataContract.cs
- DbConnectionStringCommon.cs
- StringResourceManager.cs
- TemplateBuilder.cs
- FormViewInsertedEventArgs.cs
- MethodBody.cs
- DataSourceCacheDurationConverter.cs
- WindowsContainer.cs
- SiteMembershipCondition.cs
- TypeLoadException.cs
- MtomMessageEncodingElement.cs
- BezierSegment.cs
- HttpDictionary.cs
- FormsAuthenticationCredentials.cs
- OciLobLocator.cs
- Size.cs
- RemoteWebConfigurationHost.cs
- UnsafeNativeMethods.cs
- BaseCAMarshaler.cs
- FileInfo.cs
- ToolStripMenuItem.cs
- RoleGroupCollection.cs
- ResourcePart.cs
- DataGridDetailsPresenter.cs
- DataGridViewCellCollection.cs
- InstanceNameConverter.cs
- TreeNodeCollection.cs
- RemotingSurrogateSelector.cs
- MarkupExtensionParser.cs
- ContentType.cs
- TagPrefixCollection.cs