Click here to Skip to main content
15,896,915 members
Articles / Programming Languages / Visual Basic

ModelStudio

Rate me:
Please Sign up or sign in to vote.
3.20/5 (4 votes)
6 Dec 2008CPOL4 min read 34.4K   385   28  
Class diagram and code generation tool.
Imports System.CodeDom

''' <summary>
''' An object that represents a Visual Studio Namespace.
''' </summary>
''' <remarks></remarks>
<Serializable()> _
Public Class CodeDomNamespace
    Implements ICodeMember

#Region "Declarations"

    Private mNameSpace As CodeNamespace
    Private cparent As Object

#End Region

#Region "ctor"

    ''' <summary>
    ''' Initialize a new instance of the CodeDomNamespace object
    ''' </summary>
    ''' <remarks></remarks>
    Sub New()
        mNameSpace = New CodeNamespace("myNamespace")
    End Sub

    ''' <summary>
    ''' Initialize a new instance of the CodeDomNamespace object
    ''' </summary>
    ''' <remarks></remarks>
    Sub New(ByVal Name As String)
        mNameSpace = New CodeNamespace(Name)
    End Sub

#End Region

#Region "Properties"

    Public Property Parent() As Object
        Get
            Return cparent
        End Get
        Set(ByVal value As Object)
            cparent = value
        End Set
    End Property

    ''' <summary>
    ''' The name of the represented Namespace
    ''' </summary>
    Public Property Name() As String Implements ICodeMember.Name
        Get
            Return mNameSpace.Name
        End Get
        Set(ByVal value As String)
            mNameSpace.Name = value
        End Set
    End Property

    Private colClasses As CodeDomClassCollection = New CodeDomClassCollection(Me)
    ''' <summary>
    ''' The collection of classes for this namespace
    ''' </summary>
    ReadOnly Property Classes() As CodeDomClassCollection
        Get
            Return colClasses
        End Get
    End Property

    Private colImports As CodeDomImportCollection = New CodeDomImportCollection(Me)
    ''' <summary>
    ''' The collection of imports for this namespace
    ''' </summary>
    ReadOnly Property [Imports]() As CodeDomImportCollection
        Get
            Return colImports
        End Get
    End Property

    ''' <summary>
    ''' Used by Generator: Exposes the namespace for code generation
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public ReadOnly Property DOMNameSpace() As CodeNamespace
        Get
            Return mNameSpace
        End Get
    End Property

#End Region

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Arkitech EBC Corporation
United States United States
MS, BBA, software developer, consultant, and trainer. Specializing in building data-centric applications designed for business, university, community & faith based organizations. Started developing Excel VBA macros and never looked back. Freelance developer utilizing VB.Net, SQL Server, Microsoft Access, and ASP.Net.

Comments and Discussions