Table of Contents

Class ComposedType

Namespace
ICSharpCode.Decompiler.CSharp.Syntax
Assembly
ICSharpCode.Decompiler.dll
public class ComposedType : AstType, IAnnotatable, IFreezable, INode, ICloneable
Inheritance
ComposedType
Implements
Inherited Members
Extension Methods

Constructors

ComposedType()

public ComposedType()

Fields

ArraySpecifierRole

public static readonly Role<ArraySpecifier> ArraySpecifierRole

Field Value

Role<ArraySpecifier>

AttributeRole

public static readonly Role<AttributeSection> AttributeRole

Field Value

Role<AttributeSection>

NullableRole

public static readonly TokenRole NullableRole

Field Value

TokenRole

PointerRole

public static readonly TokenRole PointerRole

Field Value

TokenRole

ReadonlyRole

public static readonly TokenRole ReadonlyRole

Field Value

TokenRole

RefRole

public static readonly TokenRole RefRole

Field Value

TokenRole

Properties

ArraySpecifiers

public AstNodeCollection<ArraySpecifier> ArraySpecifiers { get; }

Property Value

AstNodeCollection<ArraySpecifier>

Attributes

public AstNodeCollection<AttributeSection> Attributes { get; }

Property Value

AstNodeCollection<AttributeSection>

BaseType

public AstType BaseType { get; set; }

Property Value

AstType

HasNullableSpecifier

public bool HasNullableSpecifier { get; set; }

Property Value

bool

HasOnlyNullableSpecifier

public bool HasOnlyNullableSpecifier { get; }

Property Value

bool

HasReadOnlySpecifier

Gets/sets whether this type has a 'readonly' specifier. This is used for C# 7.2 'ref readonly' locals/ref return. Parameters use ParameterDeclaration.ParameterModifier instead.

public bool HasReadOnlySpecifier { get; set; }

Property Value

bool

HasRefSpecifier

Gets/sets whether this type has a 'ref' specifier. This is used for C# 7 ref locals/ref return. Parameters use ParameterDeclaration.ParameterModifier instead.

public bool HasRefSpecifier { get; set; }

Property Value

bool

NullableSpecifierToken

public CSharpTokenNode NullableSpecifierToken { get; }

Property Value

CSharpTokenNode

PointerRank

public int PointerRank { get; set; }

Property Value

int

PointerTokens

public AstNodeCollection<CSharpTokenNode> PointerTokens { get; }

Property Value

AstNodeCollection<CSharpTokenNode>

Methods

AcceptVisitor(IAstVisitor)

public override void AcceptVisitor(IAstVisitor visitor)

Parameters

visitor IAstVisitor

AcceptVisitor<T>(IAstVisitor<T>)

public override T AcceptVisitor<T>(IAstVisitor<T> visitor)

Parameters

visitor IAstVisitor<T>

Returns

T

Type Parameters

T

AcceptVisitor<T, S>(IAstVisitor<T, S>, T)

public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)

Parameters

visitor IAstVisitor<T, S>
data T

Returns

S

Type Parameters

T
S

DoMatch(AstNode, Match)

protected override bool DoMatch(AstNode other, Match match)

Parameters

other AstNode
match Match

Returns

bool

MakeArrayType(int)

Creates an array type from this type by nesting it in a ComposedType. If this type already is an array type, the additional rank is prepended to the existing array specifier list. Thus, new SimpleType("T").MakeArrayType(1).MakeArrayType(2) will result in "T[,][]".

public override AstType MakeArrayType(int dimensions)

Parameters

dimensions int

Returns

AstType

MakePointerType()

Creates a pointer type from this type by nesting it in a ComposedType. If this type already is a pointer type, this method just increases the PointerRank of the existing pointer type.

public override AstType MakePointerType()

Returns

AstType

MakeRefType()

Creates a C# 7 ref type from this type by nesting it in a ComposedType.

public override AstType MakeRefType()

Returns

AstType

ToString(CSharpFormattingOptions)

public override string ToString(CSharpFormattingOptions formattingOptions)

Parameters

formattingOptions CSharpFormattingOptions

Returns

string

ToTypeReference(NameLookupMode, InterningProvider)

public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider interningProvider = null)

Parameters

lookupMode NameLookupMode
interningProvider InterningProvider

Returns

ITypeReference