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
AttributeRole
public static readonly Role<AttributeSection> AttributeRole
Field Value
NullableRole
public static readonly TokenRole NullableRole
Field Value
PointerRole
public static readonly TokenRole PointerRole
Field Value
ReadonlyRole
public static readonly TokenRole ReadonlyRole
Field Value
RefRole
public static readonly TokenRole RefRole
Field Value
Properties
ArraySpecifiers
public AstNodeCollection<ArraySpecifier> ArraySpecifiers { get; }
Property Value
Attributes
public AstNodeCollection<AttributeSection> Attributes { get; }
Property Value
BaseType
public AstType BaseType { get; set; }
Property Value
HasNullableSpecifier
public bool HasNullableSpecifier { get; set; }
Property Value
HasOnlyNullableSpecifier
public bool HasOnlyNullableSpecifier { get; }
Property Value
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
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
NullableSpecifierToken
public CSharpTokenNode NullableSpecifierToken { get; }
Property Value
PointerRank
public int PointerRank { get; set; }
Property Value
PointerTokens
public AstNodeCollection<CSharpTokenNode> PointerTokens { get; }
Property Value
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
Returns
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
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
MakeRefType()
Creates a C# 7 ref type from this type by nesting it in a ComposedType.
public override AstType MakeRefType()
Returns
ToString(CSharpFormattingOptions)
public override string ToString(CSharpFormattingOptions formattingOptions)
Parameters
formattingOptions
CSharpFormattingOptions
Returns
ToTypeReference(NameLookupMode, InterningProvider)
public override ITypeReference ToTypeReference(NameLookupMode lookupMode, InterningProvider interningProvider = null)
Parameters
lookupMode
NameLookupModeinterningProvider
InterningProvider