Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumType.cs / 1305376 / EnumType.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- 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 [....] // @backupOwner [....] //--------------------------------------------------------------------- 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
- ToolbarAUtomationPeer.cs
- AssemblyNameProxy.cs
- PointAnimation.cs
- WindowsAuthenticationEventArgs.cs
- ScriptMethodAttribute.cs
- ConfigXmlComment.cs
- SystemDropShadowChrome.cs
- RSAPKCS1SignatureFormatter.cs
- InvariantComparer.cs
- Manipulation.cs
- SoapSchemaImporter.cs
- FillRuleValidation.cs
- ResourceSet.cs
- StyleBamlRecordReader.cs
- ComponentChangingEvent.cs
- GeneralTransformCollection.cs
- ServiceDebugBehavior.cs
- VSWCFServiceContractGenerator.cs
- ResourceExpression.cs
- WebBrowserDocumentCompletedEventHandler.cs
- RelationshipDetailsCollection.cs
- SecurityManager.cs
- AppDomainAttributes.cs
- ControlHelper.cs
- TabControlCancelEvent.cs
- TriggerAction.cs
- HtmlTableCell.cs
- HMACSHA384.cs
- Pens.cs
- ExternalCalls.cs
- AtomParser.cs
- ISessionStateStore.cs
- SecurityTokenResolver.cs
- UInt16Converter.cs
- Clock.cs
- DataGridViewLinkColumn.cs
- FileFormatException.cs
- MobileUserControl.cs
- ProbeMatchesMessage11.cs
- RequestStatusBarUpdateEventArgs.cs
- SmiXetterAccessMap.cs
- Random.cs
- ObjectPropertyMapping.cs
- OutOfProcStateClientManager.cs
- SQLMoneyStorage.cs
- COAUTHINFO.cs
- ContentDisposition.cs
- InputLanguage.cs
- CustomErrorsSectionWrapper.cs
- DataGridPageChangedEventArgs.cs
- SqlAliasesReferenced.cs
- HttpSessionStateBase.cs
- WebPartCloseVerb.cs
- ACL.cs
- GeneralTransform3D.cs
- LogWriteRestartAreaState.cs
- SecUtil.cs
- ObfuscateAssemblyAttribute.cs
- SelectionItemProviderWrapper.cs
- PeerNameResolver.cs
- Triangle.cs
- ImageMetadata.cs
- TreeView.cs
- TypeHelper.cs
- SqlLiftWhereClauses.cs
- RoleManagerSection.cs
- WebPartConnectionsConnectVerb.cs
- GridViewCellAutomationPeer.cs
- DispatchOperation.cs
- CustomErrorsSectionWrapper.cs
- TraceContextEventArgs.cs
- XsdDuration.cs
- RadioButtonPopupAdapter.cs
- WithStatement.cs
- XmlSchemaGroup.cs
- Error.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ToolStripMenuItem.cs
- PeerInvitationResponse.cs
- DesignTimeParseData.cs
- Geometry.cs
- XmlReader.cs
- ProxyWebPartManager.cs
- MiniParameterInfo.cs
- FileLoadException.cs
- Merger.cs
- ScrollViewer.cs
- PieceDirectory.cs
- OAVariantLib.cs
- PipeStream.cs
- SoapIncludeAttribute.cs
- PassportAuthenticationEventArgs.cs
- EventWaitHandleSecurity.cs
- OutputCacheEntry.cs
- DateTime.cs
- SafeRegistryKey.cs
- AnnotationStore.cs
- TextEditorTables.cs
- COAUTHINFO.cs
- SoapFaultCodes.cs