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
- TypeBuilderInstantiation.cs
- ListViewGroupItemCollection.cs
- QilInvoke.cs
- ListBox.cs
- FixedTextContainer.cs
- SqlComparer.cs
- FlowDocumentReaderAutomationPeer.cs
- FileUtil.cs
- ExtenderProvidedPropertyAttribute.cs
- ObjectIDGenerator.cs
- StreamInfo.cs
- EpmSourceTree.cs
- DashStyle.cs
- TrackingMemoryStream.cs
- HttpCookiesSection.cs
- BaseUriHelper.cs
- assemblycache.cs
- XmlTextReaderImplHelpers.cs
- ResourceReferenceKeyNotFoundException.cs
- _LocalDataStore.cs
- WebCategoryAttribute.cs
- LayoutEditorPart.cs
- DecoderFallbackWithFailureFlag.cs
- HandlerFactoryWrapper.cs
- FloaterParagraph.cs
- ProfilePropertyNameValidator.cs
- DBDataPermissionAttribute.cs
- CopyCodeAction.cs
- PointHitTestResult.cs
- X509UI.cs
- IsolatedStorageException.cs
- UnknownBitmapEncoder.cs
- ParseChildrenAsPropertiesAttribute.cs
- ArrayList.cs
- EventLogPermissionEntry.cs
- _Connection.cs
- PartEditor.cs
- OutgoingWebResponseContext.cs
- FtpWebResponse.cs
- ParseNumbers.cs
- Double.cs
- DataRelationPropertyDescriptor.cs
- BinaryConverter.cs
- OSFeature.cs
- Animatable.cs
- FilterElement.cs
- WebSysDescriptionAttribute.cs
- IisTraceListener.cs
- RangeEnumerable.cs
- DefinitionUpdate.cs
- Control.cs
- RuleAction.cs
- ConsoleCancelEventArgs.cs
- AppSettingsExpressionEditor.cs
- MarkupWriter.cs
- HostExecutionContextManager.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- FileUpload.cs
- PageRanges.cs
- IsolatedStorageFilePermission.cs
- LostFocusEventManager.cs
- ContentFileHelper.cs
- PatternMatcher.cs
- ContainerFilterService.cs
- ReaderWriterLock.cs
- AngleUtil.cs
- TextEffect.cs
- ToolStripItemCollection.cs
- Selector.cs
- Imaging.cs
- InputMethod.cs
- ViewValidator.cs
- PageThemeParser.cs
- MouseGestureValueSerializer.cs
- SystemWebSectionGroup.cs
- TreeViewAutomationPeer.cs
- DrawListViewItemEventArgs.cs
- DataRow.cs
- LightweightCodeGenerator.cs
- BitmapEffect.cs
- StandardToolWindows.cs
- GregorianCalendar.cs
- ModuleBuilderData.cs
- SmiMetaDataProperty.cs
- ServerIdentity.cs
- Binding.cs
- CultureMapper.cs
- SmtpDigestAuthenticationModule.cs
- WebPartsPersonalizationAuthorization.cs
- XmlSchemaComplexContent.cs
- AspProxy.cs
- XmlDataSource.cs
- QuotedPrintableStream.cs
- StateMachineWorkflowInstance.cs
- InvokePattern.cs
- PowerModeChangedEventArgs.cs
- InheritanceContextChangedEventManager.cs
- Membership.cs
- PartialTrustVisibleAssembly.cs
- xmlglyphRunInfo.cs