CxDeclarationType

Description

sealed class Tinman.Core.Cx.Declarations.CxDeclarationType

A declaration of a class, interface or struct type:

...
class MyType<T> : BaseType where T : Type
{
  #region Region

  ...

  #endregion
}

...
interface MyType...

...
struct MyType...
See also

CxRegion

Public / Constructors

Cx​Declaration​Type


public constructor CxDeclarationType → (8)

modifiers in : CxModifiers

See ICxModifiersContainer.Modifiers.

semantic in : int32

See Semantic.

name in : CxId

See ICxIdContainer.Name.

xmlDoc opt : CxXmlDoc = null

See ICxXmlDocContainer.XmlDoc.

attributes opt : IBagConst<CxAttribute> = null

The attribute list of the member or null for an empty list. See ICxAttributesContainer.Attributes.

typeParameters opt : IBagConst<CxTypeParameter> = null

The generic type parameter list of the type or null for an empty list. See ICxTypeParametersContainer.TypeParameters.

baseTypes opt : IBagConst<CxTypeName> = null

The base type list of the type or null for an empty list. See ICxBaseTypesContainer.BaseTypes.

regions opt : IBagConst<CxRegion> = null

The region list of the type or null for an empty list. See Regions.

Creates a new instance of CxDeclarationType.

Public / Methods

As​Code​Unit

4 overloads


public method AsCodeUnit1 → (1)

name opt : string = null

The namespace of the code unit. If null, 'MyNamespace' will be used.

returns → CxCodeUnit

The wrapping code unit.

Wraps this type declaration in a code unit.

ValidatingException

If name opt is invalid.


public method AsCodeUnit2 → (2)

name in : string

The namespace of the code unit. If null, 'MyNamespace' will be used.

usings in : string

The using directive.

returns → CxCodeUnit

The wrapping code unit.

Wraps this type declaration in a code unit.

ValidatingException

If name in or usings in is invalid.


public method AsCodeUnit3 → (2)

name in : string

The namespace of the code unit. If null, 'MyNamespace' will be used.

usings in : string [ ]

The using directives.

returns → CxCodeUnit

The wrapping code unit.

Wraps this type declaration in a code unit.

ValidatingException

If name in or usings in is invalid.


public method AsCodeUnit4 → (2)

name in : CxName

The namespace of the code unit.

usings opt : IBagConst<CxName> = null

The using directives.

returns → CxCodeUnit

The wrapping code unit.

Wraps this type declaration in a code unit.

Public / Attributes

Base​Type


public attribute BaseType → (get)

value : CxDeclarationType

The base class type (which may be CxTypeSimple.Obj) or null iff this is not a class type.

Returns the base class type of this class type.

Constructors


[Constant]
public attribute Constructors → (get)

value : IVectorConst<CxMemberConstructor>

[not-null]
The list of declared constructors.

Returns the constructors that are declared by this type.

Constructors are referenced by instanced of CxExpressionNew.

Method​Groups


[Constant]
public attribute MethodGroups → (get)

value : ISortedMapConst<CxId, CxMethodGroup>

[not-null]
The declared methods, grouped by their ICxIdContainer.Name.

Returns the method that are declared by this type.

A method group with more than one entry must be disambiguated by signature, see CxExpressionCall and CxXmlDocReference.

Regions


[Constant]
public attribute Regions → (get)

value : IVectorConst<CxRegion>

[not-null]
The region list.

Returns the regions of this type declaration.

Semantic


[Constant]
public attribute Semantic → (get)

value : int32

< 0 : this is a struct declaration,
= 0 : this is a class declaration,
> 0 : this is an interface declaration

Returns the semantic of this type declaration.