Table of Contents

Class SzArrayTypeSignature

Namespace
AsmResolver.DotNet.Signatures
Assembly
AsmResolver.DotNet.dll

Represents a type signature describing a single dimension array with 0 as a lower bound.

public class SzArrayTypeSignature : ArrayBaseTypeSignature, ITypeDescriptor, IMemberDescriptor, IFullNameProvider, INameProvider, IModuleProvider, IImportable
Inheritance
SzArrayTypeSignature
Implements
Inherited Members
Extension Methods

Constructors

SzArrayTypeSignature(TypeSignature)

Creates a new single-dimension array signature with 0 as a lower bound.

public SzArrayTypeSignature(TypeSignature baseType)

Parameters

baseType TypeSignature

The type of the elements to store in the array.

Properties

ElementType

Gets the element type of the

public override ElementType ElementType { get; }

Property Value

ElementType

Name

Gets the name of the object.

public override string Name { get; }

Property Value

string

Rank

Gets the number of dimensions this array defines.

public override int Rank { get; }

Property Value

int

Methods

AcceptVisitor<TResult>(ITypeSignatureVisitor<TResult>)

Visit the current type signature using the provided visitor.

public override TResult AcceptVisitor<TResult>(ITypeSignatureVisitor<TResult> visitor)

Parameters

visitor ITypeSignatureVisitor<TResult>

The visitor to accept.

Returns

TResult

The result the visitor produced after visiting this type signature.

Type Parameters

TResult

The type of result the visitor produces.

AcceptVisitor<TState, TResult>(ITypeSignatureVisitor<TState, TResult>, TState)

Visit the current type signature using the provided visitor.

public override TResult AcceptVisitor<TState, TResult>(ITypeSignatureVisitor<TState, TResult> visitor, TState state)

Parameters

visitor ITypeSignatureVisitor<TState, TResult>

The visitor to accept.

state TState

Additional state.

Returns

TResult

The result the visitor produced after visiting this type signature.

Type Parameters

TState

The type of additional state.

TResult

The type of result the visitor produces.

GetDimensions()

Obtains the dimensions this array defines.

public override IEnumerable<ArrayDimension> GetDimensions()

Returns

IEnumerable<ArrayDimension>

The dimensions.

GetDirectBaseClass()

Obtains the direct base class of the type signature.

public override TypeSignature? GetDirectBaseClass()

Returns

TypeSignature

The type representing the immediate base class.

Remarks

The direct base class is computed according to the rules defined in ECMA-335 I.8.7, where interfaces will extend object, and generic base types will be instantiated with the derived classes type arguments (if any).