Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Events.cs
- MD5.cs
- DriveNotFoundException.cs
- Error.cs
- MethodImplAttribute.cs
- Control.cs
- NumericUpDownAcceleration.cs
- FileAuthorizationModule.cs
- PointHitTestParameters.cs
- AuthenticationService.cs
- ValidateNames.cs
- HttpModuleAction.cs
- ListViewDeletedEventArgs.cs
- PhysicalAddress.cs
- FilePrompt.cs
- DataTablePropertyDescriptor.cs
- HttpBindingExtension.cs
- DataBindingExpressionBuilder.cs
- FlowLayoutSettings.cs
- SHA1CryptoServiceProvider.cs
- XDeferredAxisSource.cs
- Lookup.cs
- CapabilitiesSection.cs
- TreeViewItemAutomationPeer.cs
- FontDifferentiator.cs
- ControlBuilderAttribute.cs
- ConvertersCollection.cs
- GZipDecoder.cs
- UseAttributeSetsAction.cs
- PresentationSource.cs
- MessageHeader.cs
- SynchronizationLockException.cs
- CachedPathData.cs
- BezierSegment.cs
- PersonalizationAdministration.cs
- ImplicitInputBrush.cs
- CustomErrorsSectionWrapper.cs
- TextRunCache.cs
- DataSourceNameHandler.cs
- EntityDataSourceValidationException.cs
- MSHTMLHost.cs
- EventProxy.cs
- Expander.cs
- CodeObjectCreateExpression.cs
- PreviewPrintController.cs
- XmlValueConverter.cs
- UInt64Converter.cs
- DefaultAsyncDataDispatcher.cs
- PolyLineSegment.cs
- DataObject.cs
- XamlToRtfWriter.cs
- DocumentViewerHelper.cs
- DataAccessException.cs
- DBCSCodePageEncoding.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- DataGridViewCheckBoxCell.cs
- DbProviderFactories.cs
- _WinHttpWebProxyDataBuilder.cs
- securitymgrsite.cs
- ClosableStream.cs
- ObjectDataSourceMethodEventArgs.cs
- RequestFactory.cs
- IMembershipProvider.cs
- TreeNodeCollection.cs
- EntityKey.cs
- PrimarySelectionAdorner.cs
- TTSEngineProxy.cs
- ProfilePropertyNameValidator.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- Formatter.cs
- NonVisualControlAttribute.cs
- TypeProvider.cs
- XmlAttributes.cs
- EmptyEnumerator.cs
- PropertyChangingEventArgs.cs
- objectresult_tresulttype.cs
- SqlInternalConnection.cs
- XPathSelectionIterator.cs
- tabpagecollectioneditor.cs
- EventLogger.cs
- SiteMapNodeItemEventArgs.cs
- WindowsIPAddress.cs
- ImageCodecInfoPrivate.cs
- UnescapedXmlDiagnosticData.cs
- WebContext.cs
- ColorAnimationBase.cs
- SafePointer.cs
- RequestSecurityTokenSerializer.cs
- ReadingWritingEntityEventArgs.cs
- SHA384Managed.cs
- QueryableDataSourceView.cs
- IndependentlyAnimatedPropertyMetadata.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- ImageField.cs
- documentsequencetextview.cs
- EpmCustomContentWriterNodeData.cs
- TypeConverterAttribute.cs
- FixedPosition.cs
- HierarchicalDataBoundControl.cs
- ByeMessageApril2005.cs