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
- Msmq4PoisonHandler.cs
- Style.cs
- DataSourceControl.cs
- SettingsPropertyIsReadOnlyException.cs
- ArraySet.cs
- PrivilegeNotHeldException.cs
- StringExpressionSet.cs
- JapaneseLunisolarCalendar.cs
- HttpCacheParams.cs
- MemberExpressionHelper.cs
- ClientSponsor.cs
- CodeActivity.cs
- HMACMD5.cs
- Pen.cs
- SamlDoNotCacheCondition.cs
- NetworkInformationException.cs
- ClientScriptManager.cs
- Funcletizer.cs
- BeginEvent.cs
- listitem.cs
- ConnectionsZone.cs
- FileDialogPermission.cs
- TokenizerHelper.cs
- ConnectionInterfaceCollection.cs
- StatusStrip.cs
- ItemContainerGenerator.cs
- ObjectAnimationBase.cs
- GlyphCache.cs
- Queue.cs
- XPathItem.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- TraceUtility.cs
- MsmqEncryptionAlgorithm.cs
- EdgeProfileValidation.cs
- PrePostDescendentsWalker.cs
- PointCollectionConverter.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- ResourcesGenerator.cs
- HtmlTernaryTree.cs
- DbConnectionStringCommon.cs
- TableDesigner.cs
- ValueUnavailableException.cs
- Menu.cs
- ImagingCache.cs
- ComponentCollection.cs
- FlowLayout.cs
- SqlDataSourceCommandEventArgs.cs
- SessionEndingCancelEventArgs.cs
- TabControlToolboxItem.cs
- TabletDevice.cs
- SqlConnectionManager.cs
- Vector3DValueSerializer.cs
- MetafileHeaderWmf.cs
- CancelEventArgs.cs
- XmlIlTypeHelper.cs
- SizeF.cs
- FontClient.cs
- ContentPlaceHolder.cs
- TimelineClockCollection.cs
- VerificationException.cs
- DeviceContext.cs
- propertyentry.cs
- Point3DCollectionValueSerializer.cs
- PolicyChain.cs
- CuspData.cs
- DynamicValidatorEventArgs.cs
- Visual3D.cs
- Brushes.cs
- CodeDelegateInvokeExpression.cs
- AutomationIdentifier.cs
- SHA512Managed.cs
- SettingsPropertyWrongTypeException.cs
- FontFamily.cs
- DataGridViewCellStyleConverter.cs
- PageCache.cs
- ApplicationSettingsBase.cs
- ScriptComponentDescriptor.cs
- PackageDigitalSignature.cs
- DocobjHost.cs
- GridViewPageEventArgs.cs
- XmlAttributeCache.cs
- CommonXSendMessage.cs
- SoapHeaderAttribute.cs
- UInt16Converter.cs
- TypeExtension.cs
- Window.cs
- MethodInfo.cs
- HtmlInputImage.cs
- ResourceDisplayNameAttribute.cs
- CompositionCommandSet.cs
- BasePattern.cs
- UserUseLicenseDictionaryLoader.cs
- WebCodeGenerator.cs
- NativeMethods.cs
- XPathNode.cs
- WebPartConnectionsConnectVerb.cs
- DelegatingChannelListener.cs
- DataSourceSelectArguments.cs
- StateWorkerRequest.cs
- ColumnHeaderConverter.cs