Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- MatrixStack.cs
- CalendarTable.cs
- SHA256Managed.cs
- TemplateBindingExtension.cs
- DefaultDiscoveryService.cs
- CompoundFileStreamReference.cs
- ByteArrayHelperWithString.cs
- ContextMenuStrip.cs
- Model3DGroup.cs
- ControlPropertyNameConverter.cs
- NonSerializedAttribute.cs
- CompileXomlTask.cs
- ByteRangeDownloader.cs
- TextSegment.cs
- ForeignKeyConstraint.cs
- WebBodyFormatMessageProperty.cs
- UpdateRecord.cs
- TableItemStyle.cs
- DataGridGeneralPage.cs
- FileDialogPermission.cs
- Cursor.cs
- DataGridViewRowStateChangedEventArgs.cs
- ServiceProviders.cs
- ActiveDesignSurfaceEvent.cs
- CaseInsensitiveComparer.cs
- MetadataSerializer.cs
- CompositeDataBoundControl.cs
- RelationshipNavigation.cs
- CLRBindingWorker.cs
- DataGridViewCellParsingEventArgs.cs
- RtfFormatStack.cs
- AttributeTableBuilder.cs
- WebPartZoneCollection.cs
- SmiTypedGetterSetter.cs
- ArrayConverter.cs
- SchemaNamespaceManager.cs
- AccessKeyManager.cs
- RemoteDebugger.cs
- Attributes.cs
- XmlILIndex.cs
- SafeRegistryKey.cs
- BinaryFormatter.cs
- XmlDocumentType.cs
- OdbcConnectionFactory.cs
- WebPartsPersonalizationAuthorization.cs
- ScriptControlDescriptor.cs
- BamlMapTable.cs
- DependencyPropertyValueSerializer.cs
- VectorAnimation.cs
- WebAdminConfigurationHelper.cs
- ValueUnavailableException.cs
- LiteralControl.cs
- ConfigurationProperty.cs
- PathFigureCollectionValueSerializer.cs
- HttpCacheVaryByContentEncodings.cs
- Substitution.cs
- propertyentry.cs
- MenuEventArgs.cs
- DesignerUtility.cs
- DefaultPrintController.cs
- Object.cs
- LassoSelectionBehavior.cs
- NonSerializedAttribute.cs
- Rule.cs
- TransformerTypeCollection.cs
- AndMessageFilter.cs
- RegexCapture.cs
- DSASignatureDeformatter.cs
- CacheVirtualItemsEvent.cs
- HwndHost.cs
- EntityChangedParams.cs
- PermissionRequestEvidence.cs
- ScriptControlManager.cs
- XsdBuilder.cs
- UIElement3D.cs
- Helper.cs
- Mapping.cs
- CryptoKeySecurity.cs
- EventSourceCreationData.cs
- PrimitiveList.cs
- DataListItem.cs
- XmlText.cs
- EntityDataSourceValidationException.cs
- ByteConverter.cs
- _NestedSingleAsyncResult.cs
- CapabilitiesRule.cs
- ProcessProtocolHandler.cs
- HandleExceptionArgs.cs
- WebPartTransformerAttribute.cs
- DataGridViewColumn.cs
- BatchServiceHost.cs
- PageThemeParser.cs
- DataChangedEventManager.cs
- SelectedDatesCollection.cs
- TextServicesProperty.cs
- TemplateBindingExpression.cs
- Figure.cs
- Style.cs
- SQLInt16.cs
- MailAddressCollection.cs