Class PhysicalCilOperandResolver
- Namespace
- AsmResolver.DotNet.Code.Cil
- Assembly
- AsmResolver.DotNet.dll
Provides an implementation of the ICilOperandResolver class that resolves operands by looking up members and strings in the physical metadata of the underlying module.
public class PhysicalCilOperandResolver : ICilOperandResolver
- Inheritance
-
PhysicalCilOperandResolver
- Implements
- Derived
- Inherited Members
Constructors
PhysicalCilOperandResolver(ModuleDefinition, MethodDefinition, CilMethodBody)
Creates a new instance of the PhysicalCilOperandResolver class.
public PhysicalCilOperandResolver(ModuleDefinition contextModule, MethodDefinition method, CilMethodBody methodBody)
Parameters
contextModuleModuleDefinitionThe context module.
methodMethodDefinitionThe method that will own the method body.
methodBodyCilMethodBodyThe method body that references the operands.
Methods
ResolveLocalVariable(int)
Resolves a local variable operand.
public virtual object? ResolveLocalVariable(int index)
Parameters
indexintThe index of the local variable to resolve.
Returns
- object
The local variable, or
nullif the index could not be resolved to a local variable.
ResolveMember(MetadataToken)
Resolves a member operand.
public virtual object? ResolveMember(MetadataToken token)
Parameters
tokenMetadataTokenThe metadata token of the referenced member.
Returns
- object
The member, or
nullif the metadata token could not be resolved to a member.
ResolveParameter(int)
Resolves a parameter operand.
public virtual object? ResolveParameter(int index)
Parameters
indexintThe index of the parameter to resolve.
Returns
- object
The parameter, or
nullif the index could not be resolved to a local variable.
ResolveString(MetadataToken)
Resolves a string operand.
public virtual object? ResolveString(MetadataToken token)
Parameters
tokenMetadataTokenThe metadata token of the referenced string/
Returns
- object
The string, or
nullif the metadata token could not be resolved to a string.