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
Scope
Gets the resolution scope that defines the type.
IResolutionScope? Scope { get; }
Property Value
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
contextRuntimeContextThe context to assume when resolving the type.
definitionTypeDefinitionThe resolved type definition, or
nullif 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
contextRuntimeContextThe 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
contextRuntimeContextThe runtime context that is assumed.
Returns
- bool?
truewhen the type is considered a value type,falsewhen it is a reference type,nullwhen unknown.