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 / EnumType.cs / 2 / EnumType.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- namespace System.Data.Metadata.Edm { using System.Data.Common; ////// Class representing a enumeration type /// internal sealed class EnumType : SimpleType { #region Constructors ////// The default constructor for EnumType: for bootstraping /// internal EnumType() { } ////// The constructor for EnumType. It takes the required information to identify this type. /// /// The name of this type /// The namespace name of this type /// The version of this type /// dataspace in which the enum belongs to ///Thrown if either name, namespace or version arguments are null internal EnumType(string name, string namespaceName, DataSpace dataSpace) : base(name, namespaceName, dataSpace) { } #endregion #region Fields private readonly ReadOnlyMetadataCollection_enumMembers = new ReadOnlyMetadataCollection (new MetadataCollection ()); #endregion #region Properties /// /// Returns the kind of the type /// public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.EnumType; } } ////// The collection of enumeration members belong to this enumeration type /// [MetadataProperty(BuiltInTypeKind.EnumMember, true)] public ReadOnlyMetadataCollectionEnumMembers { get { return _enumMembers; } } /// /// Sets this item to be readonly, once this is set, the item will never be writable again. /// internal override void SetReadOnly() { if (!IsReadOnly) { base.SetReadOnly(); this.EnumMembers.Source.SetReadOnly(); } } ////// Adds the given member to the member collection /// /// internal void AddMember(EnumMember enumMember) { this.EnumMembers.Source.Add(enumMember); } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....], [....] //--------------------------------------------------------------------- namespace System.Data.Metadata.Edm { using System.Data.Common; ////// Class representing a enumeration type /// internal sealed class EnumType : SimpleType { #region Constructors ////// The default constructor for EnumType: for bootstraping /// internal EnumType() { } ////// The constructor for EnumType. It takes the required information to identify this type. /// /// The name of this type /// The namespace name of this type /// The version of this type /// dataspace in which the enum belongs to ///Thrown if either name, namespace or version arguments are null internal EnumType(string name, string namespaceName, DataSpace dataSpace) : base(name, namespaceName, dataSpace) { } #endregion #region Fields private readonly ReadOnlyMetadataCollection_enumMembers = new ReadOnlyMetadataCollection (new MetadataCollection ()); #endregion #region Properties /// /// Returns the kind of the type /// public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.EnumType; } } ////// The collection of enumeration members belong to this enumeration type /// [MetadataProperty(BuiltInTypeKind.EnumMember, true)] public ReadOnlyMetadataCollectionEnumMembers { get { return _enumMembers; } } /// /// Sets this item to be readonly, once this is set, the item will never be writable again. /// internal override void SetReadOnly() { if (!IsReadOnly) { base.SetReadOnly(); this.EnumMembers.Source.SetReadOnly(); } } ////// Adds the given member to the member collection /// /// internal void AddMember(EnumMember enumMember) { this.EnumMembers.Source.Add(enumMember); } #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
- ListViewTableCell.cs
- HttpDictionary.cs
- DataGridViewColumnConverter.cs
- Console.cs
- ParseHttpDate.cs
- JsonStringDataContract.cs
- WithStatement.cs
- DataBoundLiteralControl.cs
- AutoGeneratedFieldProperties.cs
- StructuralCache.cs
- PublisherIdentityPermission.cs
- PeerNearMe.cs
- AsyncPostBackTrigger.cs
- InkCanvasSelection.cs
- XmlNullResolver.cs
- CombinedTcpChannel.cs
- LayoutEngine.cs
- XslAstAnalyzer.cs
- Int64Animation.cs
- CustomErrorsSection.cs
- DateBoldEvent.cs
- Bitmap.cs
- UICuesEvent.cs
- StreamGeometry.cs
- XmlAggregates.cs
- UnmanagedBitmapWrapper.cs
- CommunicationObject.cs
- TransactionState.cs
- DataGridClipboardHelper.cs
- ValidatingReaderNodeData.cs
- DictionarySectionHandler.cs
- SamlAssertion.cs
- HelpPage.cs
- WindowsFormsHostPropertyMap.cs
- _WinHttpWebProxyDataBuilder.cs
- GridViewUpdateEventArgs.cs
- NativeMethods.cs
- TypeName.cs
- CompilerState.cs
- MetadataArtifactLoader.cs
- EnumerableWrapperWeakToStrong.cs
- xml.cs
- MessageQueue.cs
- ZoomComboBox.cs
- _SSPISessionCache.cs
- ResXDataNode.cs
- ActivityBuilderHelper.cs
- SqlClientPermission.cs
- LocatorPart.cs
- MatrixCamera.cs
- _AutoWebProxyScriptEngine.cs
- Merger.cs
- ExpandoClass.cs
- SurrogateChar.cs
- WebPartMenu.cs
- BamlCollectionHolder.cs
- MemberAccessException.cs
- basenumberconverter.cs
- XmlDocumentType.cs
- RowToParametersTransformer.cs
- ListenerSessionConnectionReader.cs
- DocumentEventArgs.cs
- NativeMethods.cs
- SHA1.cs
- PropertyDescriptor.cs
- DisplayInformation.cs
- SchemaInfo.cs
- SQLBytesStorage.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- CredentialCache.cs
- DoubleAnimationClockResource.cs
- SvcFileManager.cs
- AliasedExpr.cs
- OdbcHandle.cs
- KeySplineConverter.cs
- BooleanProjectedSlot.cs
- EpmSourcePathSegment.cs
- PropertyEmitterBase.cs
- IPipelineRuntime.cs
- SafeRightsManagementPubHandle.cs
- securitycriticaldata.cs
- FrameworkElement.cs
- Timer.cs
- elementinformation.cs
- ConnectionAcceptor.cs
- ResourceBinder.cs
- SevenBitStream.cs
- Preprocessor.cs
- SoapSchemaExporter.cs
- HotSpot.cs
- XPathMessageFilter.cs
- ThreadPool.cs
- ToolStripOverflowButton.cs
- WebPartZone.cs
- DSACryptoServiceProvider.cs
- compensatingcollection.cs
- WinEventHandler.cs
- ArithmeticException.cs
- ExitEventArgs.cs
- CodeMemberProperty.cs