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
- ApplicationInterop.cs
- ArrayElementGridEntry.cs
- ApplyImportsAction.cs
- HttpModuleActionCollection.cs
- TextClipboardData.cs
- EpmSourceTree.cs
- DbParameterHelper.cs
- MouseOverProperty.cs
- TextSelectionHighlightLayer.cs
- OleDbCommand.cs
- FormViewDeleteEventArgs.cs
- XmlCharCheckingWriter.cs
- CheckBox.cs
- FullTextState.cs
- Cursors.cs
- httpserverutility.cs
- SimpleMailWebEventProvider.cs
- BamlCollectionHolder.cs
- ProxyAttribute.cs
- AbstractExpressions.cs
- ByValueEqualityComparer.cs
- AttributeAction.cs
- TrackingProfile.cs
- Regex.cs
- DefaultValueConverter.cs
- TableCell.cs
- ThreadAttributes.cs
- MimeImporter.cs
- SafeHandles.cs
- PageAsyncTaskManager.cs
- AsyncWaitHandle.cs
- ControlIdConverter.cs
- ArrangedElement.cs
- GridViewRow.cs
- Rect3DValueSerializer.cs
- TabletDevice.cs
- DrawListViewColumnHeaderEventArgs.cs
- StateInitialization.cs
- Int16Storage.cs
- CodeGeneratorOptions.cs
- _BasicClient.cs
- WeakReference.cs
- LiteralControl.cs
- OutputCache.cs
- XmlSchemaFacet.cs
- NameValueSectionHandler.cs
- XmlSchemaObject.cs
- OpenTypeCommon.cs
- ProcessInputEventArgs.cs
- ObjectConverter.cs
- HelpEvent.cs
- Rectangle.cs
- _IPv4Address.cs
- ColorConverter.cs
- ConfigDefinitionUpdates.cs
- Error.cs
- StrongNamePublicKeyBlob.cs
- CompilationRelaxations.cs
- RuleSettings.cs
- ProbeMatches11.cs
- DbProviderConfigurationHandler.cs
- GridViewDeleteEventArgs.cs
- SingleConverter.cs
- CachedFontFamily.cs
- ExceptionValidationRule.cs
- WindowsSecurityToken.cs
- SafeMarshalContext.cs
- TableColumn.cs
- FileInfo.cs
- WebPartEventArgs.cs
- ListViewCancelEventArgs.cs
- Image.cs
- ExternalException.cs
- TextSpanModifier.cs
- Rotation3D.cs
- ConfigViewGenerator.cs
- WebEventTraceProvider.cs
- Knowncolors.cs
- ElementNotEnabledException.cs
- CodeStatementCollection.cs
- dataSvcMapFileLoader.cs
- RawMouseInputReport.cs
- WFItemsToSpacerVisibility.cs
- ObjectDataSourceDesigner.cs
- RequestSecurityTokenResponse.cs
- Wizard.cs
- DrawingState.cs
- AssemblyUtil.cs
- DataMemberAttribute.cs
- EventLogTraceListener.cs
- SqlUserDefinedTypeAttribute.cs
- SessionStateContainer.cs
- XmlComment.cs
- HttpCachePolicy.cs
- InputScope.cs
- KoreanLunisolarCalendar.cs
- Visual3D.cs
- SemanticResultKey.cs
- NameValuePermission.cs
- ToolStripScrollButton.cs