Class TypeSpecificationSignature
- Namespace
- AsmResolver.DotNet.Signatures
- Assembly
- AsmResolver.DotNet.dll
Provides a base for type signatures that are based on another type signature.
public abstract class TypeSpecificationSignature : TypeSignature, ITypeDescriptor, IMemberDescriptor, IFullNameProvider, INameProvider, IModuleProvider, IImportable
- Inheritance
-
TypeSpecificationSignature
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
TypeSpecificationSignature(TypeSignature)
Initializes a new type specification.
protected TypeSpecificationSignature(TypeSignature baseType)
Parameters
baseType
TypeSignatureThe type to base the specification on.
Properties
BaseType
Gets the type this specification is based on.
public TypeSignature BaseType { get; set; }
Property Value
Module
Gets the module that defines the member definition or reference.
public override ModuleDefinition? Module { get; }
Property Value
Remarks
For member references, this does not obtain the module definition that the member is defined in. Rather, it obtains the module definition that references this reference.
Namespace
Gets the namespace the type resides in.
public override string? Namespace { get; }
Property Value
Scope
Gets the resolution scope that defines the type.
public override IResolutionScope? Scope { get; }
Property Value
Methods
GetUnderlyingTypeDefOrRef()
Gets the underlying base type signature, without any extra adornments.
public override ITypeDefOrRef? GetUnderlyingTypeDefOrRef()
Returns
- ITypeDefOrRef
The base signature.
Remarks
This is not to be confused with GetUnderlyingType(), which may resolve enum types to their underlying type representation.
IsImportedInModule(ModuleDefinition)
Determines whether the descriptor of the member is fully imported in the provided module.
public override bool IsImportedInModule(ModuleDefinition module)
Parameters
module
ModuleDefinitionThe 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.
Resolve()
Resolves the reference to a type definition.
public override TypeDefinition? Resolve()
Returns
- TypeDefinition
The resolved type definition, or
null
if the type could not be resolved.
Remarks
This method can only be invoked if the reference was added to a module.
WriteBaseType(BlobSerializationContext)
Writes BaseType to the output stream.
protected void WriteBaseType(BlobSerializationContext context)
Parameters
context
BlobSerializationContextThe output stream.
WriteContents(in BlobSerializationContext)
Serializes the blob (without extra data) to an output stream.
protected override void WriteContents(in BlobSerializationContext context)
Parameters
context
BlobSerializationContext