Table of Contents

Interface ITypeDescriptor

Namespace
AsmResolver.DotNet
Assembly
AsmResolver.DotNet.dll

Provides members for describing a type in a managed assembly.

public interface ITypeDescriptor : IMemberDescriptor, IFullNameProvider, INameProvider, IModuleProvider, IImportable
Inherited Members
Extension Methods

Properties

Namespace

Gets the namespace the type resides in.

string? Namespace { get; }

Property Value

string

Scope

Gets the resolution scope that defines the type.

IResolutionScope? Scope { get; }

Property Value

IResolutionScope

Methods

Resolve(RuntimeContext?, out TypeDefinition?)

Attempts to resolve the type reference to its definition, assuming the provided module as resolution context.

ResolutionStatus Resolve(RuntimeContext? context, out TypeDefinition? definition)

Parameters

context RuntimeContext

The context to assume when resolving the type.

definition TypeDefinition

The resolved type definition, or null if the type could not be resolved.

Returns

ResolutionStatus

A value describing the success or failure status of the type resolution.

ToTypeDefOrRef()

Transforms the type descriptor to an instance of a ITypeDefOrRef, which can be referenced by a metadata token.

ITypeDefOrRef ToTypeDefOrRef()

Returns

ITypeDefOrRef

The constructed TypeDefOrRef instance.

ToTypeSignature(RuntimeContext?)

Converts the type in a type signature.

TypeSignature ToTypeSignature(RuntimeContext? context)

Parameters

context RuntimeContext

The runtime context to assume when creating the signature.

Returns

TypeSignature

The new type signature.

Remarks

When this type is a signature, gets the underlying type signature instance. Otherwise, a new signature will be instantiated.

TryGetIsValueType(RuntimeContext?)

Determines whether the type is considered a value type or reference type by the runtime.

bool? TryGetIsValueType(RuntimeContext? context)

Parameters

context RuntimeContext

The runtime context that is assumed.

Returns

bool?

true when the type is considered a value type, false when it is a reference type, null when unknown.