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
- CancellationHandlerDesigner.cs
- InputScopeConverter.cs
- CollectionBase.cs
- RecognizerBase.cs
- GeneralTransform3DTo2D.cs
- TrackingConditionCollection.cs
- EncodedStreamFactory.cs
- BindableAttribute.cs
- EventBookmark.cs
- XomlCompilerError.cs
- BindingExpressionBase.cs
- InternalConfigEventArgs.cs
- Pkcs9Attribute.cs
- SimpleExpression.cs
- OletxTransactionFormatter.cs
- WebControlAdapter.cs
- DesignerAutoFormatCollection.cs
- XmlSignatureProperties.cs
- JsonObjectDataContract.cs
- LabelAutomationPeer.cs
- ShapingEngine.cs
- CodeMethodReturnStatement.cs
- ManagementInstaller.cs
- XamlInterfaces.cs
- DataListItem.cs
- Clipboard.cs
- ContextStaticAttribute.cs
- safesecurityhelperavalon.cs
- BitArray.cs
- ObjectResult.cs
- DoubleAnimationClockResource.cs
- SchemaDeclBase.cs
- CodeDomComponentSerializationService.cs
- AssemblyUtil.cs
- TextBoxBase.cs
- XmlSchemaDatatype.cs
- NativeCompoundFileAPIs.cs
- SplineKeyFrames.cs
- WebPartMenuStyle.cs
- DefaultObjectMappingItemCollection.cs
- LinkButton.cs
- WebHttpDispatchOperationSelector.cs
- KnowledgeBase.cs
- SystemIPGlobalProperties.cs
- HttpException.cs
- ControlTemplate.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- SecurityCriticalDataForSet.cs
- Msec.cs
- Token.cs
- BasicExpressionVisitor.cs
- SystemEvents.cs
- BrowserCapabilitiesFactoryBase.cs
- EntityDataSourceWrapperCollection.cs
- ToolBarOverflowPanel.cs
- TabletDevice.cs
- EditorBrowsableAttribute.cs
- ExclusiveCanonicalizationTransform.cs
- XmlArrayItemAttributes.cs
- ProxyHwnd.cs
- Geometry3D.cs
- IndexedEnumerable.cs
- CultureTable.cs
- StaticResourceExtension.cs
- HostingPreferredMapPath.cs
- FlowDocumentFormatter.cs
- CultureInfoConverter.cs
- FormattedText.cs
- NavigationHelper.cs
- DebugControllerThread.cs
- EntityDataSourceColumn.cs
- RtfNavigator.cs
- ServiceEndpointCollection.cs
- SafeThreadHandle.cs
- FlowPosition.cs
- EncoderBestFitFallback.cs
- ResXDataNode.cs
- PagerSettings.cs
- DllNotFoundException.cs
- XmlRawWriter.cs
- CalendarDay.cs
- WebBrowser.cs
- KnownIds.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- StyleHelper.cs
- OdbcConnectionPoolProviderInfo.cs
- ZipArchive.cs
- ScrollEvent.cs
- DataGridViewCellStateChangedEventArgs.cs
- XslAst.cs
- LessThanOrEqual.cs
- OrCondition.cs
- TableCellAutomationPeer.cs
- RijndaelManaged.cs
- ObjectItemAssemblyLoader.cs
- HostingPreferredMapPath.cs
- SimpleApplicationHost.cs
- RefreshEventArgs.cs
- AutomationPatternInfo.cs
- RelationshipEnd.cs