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
- HMACRIPEMD160.cs
- RowSpanVector.cs
- HtmlInputCheckBox.cs
- PointKeyFrameCollection.cs
- SQLRoleProvider.cs
- ListViewItemSelectionChangedEvent.cs
- QuaternionAnimation.cs
- DecoderBestFitFallback.cs
- MediaContextNotificationWindow.cs
- SmiEventStream.cs
- XPathDocumentNavigator.cs
- SplitterPanel.cs
- DataControlFieldCollection.cs
- CodeIndexerExpression.cs
- SQLMembershipProvider.cs
- BuildProvidersCompiler.cs
- TypeBuilder.cs
- EmptyEnumerator.cs
- ThreadStartException.cs
- ColumnCollection.cs
- XmlWrappingReader.cs
- CompoundFileStreamReference.cs
- PersonalizationStateQuery.cs
- DataGridViewColumnDesigner.cs
- TextChangedEventArgs.cs
- DockingAttribute.cs
- WindowHideOrCloseTracker.cs
- EventSchemaTraceListener.cs
- ResourceContainer.cs
- Compilation.cs
- ButtonChrome.cs
- Help.cs
- DataReceivedEventArgs.cs
- BinaryCommonClasses.cs
- DBSchemaTable.cs
- TemplatedMailWebEventProvider.cs
- SharedStream.cs
- PagesChangedEventArgs.cs
- XLinq.cs
- QilBinary.cs
- TypeToStringValueConverter.cs
- ExtendedProtectionPolicyTypeConverter.cs
- Brush.cs
- CaseStatementProjectedSlot.cs
- ToolStripComboBox.cs
- ExtensibleClassFactory.cs
- FixedPage.cs
- PairComparer.cs
- GestureRecognitionResult.cs
- DataGridViewComboBoxCell.cs
- ModuleBuilderData.cs
- GridViewSortEventArgs.cs
- StopStoryboard.cs
- ConstructorExpr.cs
- AsmxEndpointPickerExtension.cs
- MouseActionValueSerializer.cs
- AdornedElementPlaceholder.cs
- TransferMode.cs
- StretchValidation.cs
- ErrorFormatterPage.cs
- CompModHelpers.cs
- ListSortDescription.cs
- ConfigurationValidatorBase.cs
- FontConverter.cs
- FederatedMessageSecurityOverHttp.cs
- AccessibilityApplicationManager.cs
- ChannelAcceptor.cs
- RemoteWebConfigurationHost.cs
- FormViewCommandEventArgs.cs
- GeometryConverter.cs
- ToolStripEditorManager.cs
- WorkflowViewService.cs
- DataGridPagerStyle.cs
- WorkerRequest.cs
- StringWriter.cs
- Int16Animation.cs
- TTSVoice.cs
- FontDialog.cs
- StyleSheet.cs
- securitymgrsite.cs
- AmbientEnvironment.cs
- SoapException.cs
- RegexMatch.cs
- OrthographicCamera.cs
- ByeOperationCD1AsyncResult.cs
- NativeMethods.cs
- GrammarBuilderWildcard.cs
- Variant.cs
- AsyncOperationContext.cs
- ZoneButton.cs
- ListViewPagedDataSource.cs
- TableItemProviderWrapper.cs
- CompilerError.cs
- HelpHtmlBuilder.cs
- FrugalMap.cs
- LongTypeConverter.cs
- _DigestClient.cs
- _RequestCacheProtocol.cs
- GraphicsContainer.cs
- DataGridViewColumnCollection.cs