Table of Contents

Class InvalidTypeDefOrRef

Namespace
AsmResolver.DotNet
Assembly
AsmResolver.DotNet.dll

Represents an invalid reference to a type. This class cannot be instantiated by itself nor overridden, and is only used to identify faulty or malicious structures in the .NET metadata.

public sealed class InvalidTypeDefOrRef : MetadataMember, ITypeDefOrRef, ITypeDescriptor, IMemberDescriptor, IFullNameProvider, IImportable, IMemberRefParent, INameProvider, IModuleProvider, IHasCustomAttribute, IMetadataMember
Inheritance
InvalidTypeDefOrRef
Implements
Inherited Members
Extension Methods

Properties

CustomAttributes

Gets a collection of custom attributes assigned to this member.

public IList<CustomAttribute> CustomAttributes { get; }

Property Value

IList<CustomAttribute>

Error

Gets the error that occurred when parsing the type reference.

public InvalidTypeSignatureError Error { get; }

Property Value

InvalidTypeSignatureError

Methods

Get(InvalidTypeSignatureError)

Gets the instance for the provided error.

public static InvalidTypeDefOrRef Get(InvalidTypeSignatureError error)

Parameters

error InvalidTypeSignatureError

The error.

Returns

InvalidTypeDefOrRef

The invalid type reference instance.

IsImportedInModule(ModuleDefinition)

Determines whether the descriptor of the member is fully imported in the provided module.

public bool IsImportedInModule(ModuleDefinition module)

Parameters

module ModuleDefinition

The module that is supposed to import the member.

Returns

bool

true if the descriptor of the member is fully imported by the module, false otherwise.

Remarks

This method verifies all references in the descriptor of the member only. It does not verify any additional data or contents (such as a method body) associated to the member.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.