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
- ConnectionPoint.cs
- RegexCaptureCollection.cs
- FileCodeGroup.cs
- PerfCounterSection.cs
- LinkClickEvent.cs
- TriggerAction.cs
- DataColumnMappingCollection.cs
- TreeNodeMouseHoverEvent.cs
- HelpKeywordAttribute.cs
- ManagedWndProcTracker.cs
- CallbackValidator.cs
- ControlHelper.cs
- ContainerFilterService.cs
- PointKeyFrameCollection.cs
- Decoder.cs
- FatalException.cs
- QuadraticBezierSegment.cs
- DataSourceXmlAttributeAttribute.cs
- SortedList.cs
- ServiceEndpointAssociationProvider.cs
- SmtpNetworkElement.cs
- SpellerError.cs
- MdiWindowListItemConverter.cs
- SeverityFilter.cs
- LostFocusEventManager.cs
- TextTreeInsertUndoUnit.cs
- XMLSchema.cs
- COSERVERINFO.cs
- ProviderConnectionPoint.cs
- ADMembershipUser.cs
- BaseTreeIterator.cs
- CertificateElement.cs
- NetCodeGroup.cs
- FixedSOMElement.cs
- VersionedStream.cs
- WebBrowserSiteBase.cs
- GridViewUpdatedEventArgs.cs
- EnumBuilder.cs
- FontConverter.cs
- DataGridRow.cs
- ZipIOExtraFieldElement.cs
- UnsafeNativeMethods.cs
- SQLInt16.cs
- URLMembershipCondition.cs
- TemplateParser.cs
- WindowsFormsLinkLabel.cs
- InputDevice.cs
- DiagnosticsConfigurationHandler.cs
- HScrollProperties.cs
- AudioFileOut.cs
- EventLog.cs
- ScrollEventArgs.cs
- PartBasedPackageProperties.cs
- CharKeyFrameCollection.cs
- GenerateScriptTypeAttribute.cs
- SecurityCriticalDataForSet.cs
- AssemblyResourceLoader.cs
- SmtpTransport.cs
- DelegateSerializationHolder.cs
- GeometryModel3D.cs
- PhoneCall.cs
- TypeUsage.cs
- HWStack.cs
- ConfigXmlElement.cs
- ClientSideQueueItem.cs
- OpCodes.cs
- MissingMethodException.cs
- QueryCorrelationInitializer.cs
- SchemaImporterExtension.cs
- DataGridViewCellValueEventArgs.cs
- PermissionSet.cs
- ConfigurationManagerInternalFactory.cs
- Compensate.cs
- ListViewSelectEventArgs.cs
- FixedSOMContainer.cs
- HttpListenerRequest.cs
- EditorAttribute.cs
- ApplicationSecurityInfo.cs
- CompModSwitches.cs
- BCryptNative.cs
- ExceptionHandler.cs
- CompositeControl.cs
- Quaternion.cs
- OutputCacheProfileCollection.cs
- ResourceDescriptionAttribute.cs
- DateBoldEvent.cs
- Trace.cs
- AncillaryOps.cs
- MenuItem.cs
- GlobalProxySelection.cs
- CompositeScriptReferenceEventArgs.cs
- KnownTypeDataContractResolver.cs
- Helper.cs
- FragmentQueryKB.cs
- StackSpiller.cs
- TextParagraph.cs
- XmlSerializerVersionAttribute.cs
- ModuleConfigurationInfo.cs
- Types.cs
- DataGridBoolColumn.cs