Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / EnumType.cs / 1 / 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
- DBSqlParserColumnCollection.cs
- Registry.cs
- PeerInvitationResponse.cs
- XmlSchemaObjectCollection.cs
- SafePointer.cs
- TiffBitmapEncoder.cs
- UnknownBitmapDecoder.cs
- TypeDescriptionProvider.cs
- DesignerForm.cs
- MenuItem.cs
- TextBoxLine.cs
- XmlCustomFormatter.cs
- SecurityUtils.cs
- AppDomain.cs
- AppDomainUnloadedException.cs
- DBSqlParserColumnCollection.cs
- SecurityUtils.cs
- PolicyVersion.cs
- BaseTemplateCodeDomTreeGenerator.cs
- EntitySqlQueryCacheKey.cs
- EntityCommandCompilationException.cs
- Base64Encoding.cs
- GeometryCollection.cs
- ArrayElementGridEntry.cs
- GridLengthConverter.cs
- MsmqAppDomainProtocolHandler.cs
- XmlSortKey.cs
- SqlDataSourceRefreshSchemaForm.cs
- CompensateDesigner.cs
- WebPartDisplayMode.cs
- DynamicActionMessageFilter.cs
- JpegBitmapEncoder.cs
- mda.cs
- SplayTreeNode.cs
- DebugView.cs
- OdbcErrorCollection.cs
- validation.cs
- XmlQualifiedName.cs
- ResourcePermissionBase.cs
- StorageEntitySetMapping.cs
- TextEditorLists.cs
- KeyNotFoundException.cs
- DataComponentMethodGenerator.cs
- EmbossBitmapEffect.cs
- ScriptReference.cs
- DesignerVerbCollection.cs
- QueryStatement.cs
- ObjectCloneHelper.cs
- DataObject.cs
- DiagnosticsConfiguration.cs
- CompareValidator.cs
- LockedHandleGlyph.cs
- EventBindingService.cs
- HostingEnvironmentSection.cs
- VisualState.cs
- GridViewHeaderRowPresenter.cs
- RegexRunnerFactory.cs
- ReadOnlyCollection.cs
- EntityDataSourceChangingEventArgs.cs
- ListViewContainer.cs
- EditorPartCollection.cs
- QueryPageSettingsEventArgs.cs
- Win32MouseDevice.cs
- Journaling.cs
- ChtmlFormAdapter.cs
- SmiContext.cs
- StylusButton.cs
- FontStretches.cs
- FlowDocumentPageViewerAutomationPeer.cs
- StrokeFIndices.cs
- TracePayload.cs
- XPathNavigatorReader.cs
- EUCJPEncoding.cs
- XsdDuration.cs
- MenuItem.cs
- XmlSchemaGroup.cs
- HttpCapabilitiesEvaluator.cs
- TextElementCollection.cs
- DNS.cs
- UpDownBase.cs
- StringStorage.cs
- WebSysDefaultValueAttribute.cs
- DeferredTextReference.cs
- SystemTcpStatistics.cs
- ExtendedPropertiesHandler.cs
- TraceHelpers.cs
- TimeoutException.cs
- WebServiceErrorEvent.cs
- HyperLinkField.cs
- EventPrivateKey.cs
- NativeMethods.cs
- SafeWaitHandle.cs
- PrimarySelectionAdorner.cs
- ClientBuildManager.cs
- DefaultTraceListener.cs
- Viewport3DAutomationPeer.cs
- HtmlInputText.cs
- DocumentationServerProtocol.cs
- MetafileHeader.cs
- ToolStripContentPanelRenderEventArgs.cs