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
- WebBrowserNavigatedEventHandler.cs
- RijndaelCryptoServiceProvider.cs
- VisualTreeUtils.cs
- RotateTransform3D.cs
- TreeNode.cs
- XmlSchemaCompilationSettings.cs
- TrustLevelCollection.cs
- NamespaceInfo.cs
- FilterQueryOptionExpression.cs
- TextParagraph.cs
- InheritablePropertyChangeInfo.cs
- WmlValidationSummaryAdapter.cs
- PieceNameHelper.cs
- PrintDocument.cs
- LassoSelectionBehavior.cs
- TypeBuilderInstantiation.cs
- CriticalHandle.cs
- AccessControlEntry.cs
- FixedTextSelectionProcessor.cs
- AccessDataSourceView.cs
- AttachedPropertyMethodSelector.cs
- EntityDataSourceMemberPath.cs
- ConnectionManagementSection.cs
- MimeWriter.cs
- RemotingClientProxy.cs
- TypeResolver.cs
- GC.cs
- MediaTimeline.cs
- ScriptReferenceEventArgs.cs
- HttpException.cs
- XmlSchemaObjectCollection.cs
- WaveHeader.cs
- ReadOnlyHierarchicalDataSourceView.cs
- BamlLocalizationDictionary.cs
- NumberSubstitution.cs
- WindowsStartMenu.cs
- PersistNameAttribute.cs
- MediaScriptCommandRoutedEventArgs.cs
- JulianCalendar.cs
- DbParameterCollection.cs
- PagerSettings.cs
- SatelliteContractVersionAttribute.cs
- FormattedTextSymbols.cs
- Module.cs
- ListViewSelectEventArgs.cs
- MouseBinding.cs
- XmlSchemaSimpleContentExtension.cs
- SqlNodeTypeOperators.cs
- X500Name.cs
- HtmlMeta.cs
- JapaneseCalendar.cs
- FixedSOMTextRun.cs
- XmlSignatureManifest.cs
- ThreadInterruptedException.cs
- ChildrenQuery.cs
- GroupItemAutomationPeer.cs
- SafeLibraryHandle.cs
- DurableDispatcherAddressingFault.cs
- WindowsSpinner.cs
- CategoryGridEntry.cs
- JsonMessageEncoderFactory.cs
- WindowsToolbarItemAsMenuItem.cs
- RealProxy.cs
- CustomAttributeSerializer.cs
- SimpleType.cs
- ChildrenQuery.cs
- PtsContext.cs
- HttpContextWrapper.cs
- StateDesigner.cs
- QilPatternVisitor.cs
- ArraySubsetEnumerator.cs
- WinEventHandler.cs
- RayMeshGeometry3DHitTestResult.cs
- ListViewUpdateEventArgs.cs
- XmlDataSource.cs
- CharacterShapingProperties.cs
- UrlMappingsSection.cs
- ThreadStartException.cs
- MaterializeFromAtom.cs
- DeobfuscatingStream.cs
- AnnotationAdorner.cs
- COM2IDispatchConverter.cs
- PolicyStatement.cs
- OperandQuery.cs
- DefaultTraceListener.cs
- ActivityDesignerLayoutSerializers.cs
- HandlerFactoryWrapper.cs
- ContextActivityUtils.cs
- smtpconnection.cs
- XmlILOptimizerVisitor.cs
- BaseHashHelper.cs
- BitmapEffectvisualstate.cs
- DefaultValidator.cs
- ActivityStateRecord.cs
- FontCollection.cs
- DataGridSortCommandEventArgs.cs
- AppDomain.cs
- DocumentAutomationPeer.cs
- CommandPlan.cs
- EDesignUtil.cs