Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumType.cs / 1 / 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
- User.cs
- BaseCollection.cs
- DataException.cs
- CancelEventArgs.cs
- OptimisticConcurrencyException.cs
- DropShadowBitmapEffect.cs
- ManualResetEvent.cs
- XmlAttributeHolder.cs
- MonitorWrapper.cs
- StaticDataManager.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- MobileTextWriter.cs
- TextServicesManager.cs
- WebPartZone.cs
- CustomAssemblyResolver.cs
- CodeCatchClauseCollection.cs
- ParameterElement.cs
- RelationshipConverter.cs
- Processor.cs
- MaskInputRejectedEventArgs.cs
- AnimatedTypeHelpers.cs
- DockingAttribute.cs
- SoapSchemaExporter.cs
- TransformDescriptor.cs
- IdentityReference.cs
- ListViewHitTestInfo.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- UserControlDesigner.cs
- PropertyManager.cs
- FixUp.cs
- SessionStateContainer.cs
- AncestorChangedEventArgs.cs
- XmlCompatibilityReader.cs
- XamlReader.cs
- ProcessModelInfo.cs
- UserInitiatedNavigationPermission.cs
- MissingMemberException.cs
- ValidationHelper.cs
- ReverseComparer.cs
- MemoryMappedFile.cs
- SqlDataSourceStatusEventArgs.cs
- MessageUtil.cs
- OptimizedTemplateContent.cs
- XmlNamespaceDeclarationsAttribute.cs
- DesignOnlyAttribute.cs
- ChannelServices.cs
- dsa.cs
- SerializationAttributes.cs
- DataExpression.cs
- CodeRegionDirective.cs
- CompositionAdorner.cs
- OperationInfo.cs
- StyleCollection.cs
- TranslateTransform3D.cs
- QueryExecutionOption.cs
- FrameworkContextData.cs
- StylusSystemGestureEventArgs.cs
- PropertyGroupDescription.cs
- DtrList.cs
- SafeNativeMethods.cs
- ZoomPercentageConverter.cs
- HotSpot.cs
- WindowsIPAddress.cs
- OperationAbortedException.cs
- XamlClipboardData.cs
- DateTimeOffsetConverter.cs
- DataGridViewColumnEventArgs.cs
- XmlEntityReference.cs
- XmlFormatReaderGenerator.cs
- HiddenField.cs
- LineInfo.cs
- PeerDuplexChannelListener.cs
- VerificationException.cs
- UIElementAutomationPeer.cs
- XmlIgnoreAttribute.cs
- MarkupCompiler.cs
- HostedTcpTransportManager.cs
- ListControlConvertEventArgs.cs
- PermissionSet.cs
- TextChange.cs
- SimpleApplicationHost.cs
- ItemsControl.cs
- ScrollPattern.cs
- FixedStringLookup.cs
- ApplyImportsAction.cs
- ComponentCache.cs
- LingerOption.cs
- ReaderOutput.cs
- Rect3DValueSerializer.cs
- GcSettings.cs
- DialogResultConverter.cs
- EmbossBitmapEffect.cs
- MsmqIntegrationChannelListener.cs
- FtpWebResponse.cs
- HyperLinkColumn.cs
- AndCondition.cs
- httpserverutility.cs
- XmlDataImplementation.cs
- ArrayWithOffset.cs
- controlskin.cs