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, IMemberRefParent, INameProvider, IModuleProvider, IImportable, 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
Error
Gets the error that occurred when parsing the type reference.
public InvalidTypeSignatureError Error { get; }
Property Value
HasCustomAttributes
Gets a value indicating whether the member is assigned custom attributes.
public bool HasCustomAttributes { get; }
Property Value
Methods
Get(InvalidTypeSignatureError)
Gets the instance for the provided error.
public static InvalidTypeDefOrRef Get(InvalidTypeSignatureError error)
Parameters
errorInvalidTypeSignatureErrorThe 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
moduleModuleDefinitionThe module that is supposed to import the member.
Returns
- bool
trueif the descriptor of the member is fully imported by the module,falseotherwise.
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()
public override string ToString()
Returns
ToTypeSignature()
Wraps the type reference in a signature.
public TypeSignature ToTypeSignature()
Returns
- TypeSignature
The new type signature.