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, CilMethodBody)
Creates a new instance of the PhysicalCilOperandResolver class.
public PhysicalCilOperandResolver(ModuleDefinition contextModule, CilMethodBody methodBody)
Parameters
contextModule
ModuleDefinitionThe context module.
methodBody
CilMethodBodyThe method body that references the operands.
Methods
ResolveLocalVariable(int)
Resolves a local variable operand.
public virtual object? ResolveLocalVariable(int index)
Parameters
index
intThe index of the local variable to resolve.
Returns
- object
The local variable, or
null
if the index could not be resolved to a local variable.
ResolveMember(MetadataToken)
Resolves a member operand.
public virtual object? ResolveMember(MetadataToken token)
Parameters
token
MetadataTokenThe metadata token of the referenced member.
Returns
- object
The member, or
null
if the metadata token could not be resolved to a member.
ResolveParameter(int)
Resolves a parameter operand.
public virtual object? ResolveParameter(int index)
Parameters
index
intThe index of the parameter to resolve.
Returns
- object
The parameter, or
null
if the index could not be resolved to a local variable.
ResolveString(MetadataToken)
Resolves a string operand.
public virtual object? ResolveString(MetadataToken token)
Parameters
token
MetadataTokenThe metadata token of the referenced string/
Returns
- object
The string, or
null
if the metadata token could not be resolved to a string.