Table of Contents

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 ModuleDefinition

The context module.

methodBody CilMethodBody

The method body that references the operands.

Methods

ResolveLocalVariable(int)

Resolves a local variable operand.

public virtual object? ResolveLocalVariable(int index)

Parameters

index int

The 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 MetadataToken

The 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 int

The 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 MetadataToken

The metadata token of the referenced string/

Returns

object

The string, or null if the metadata token could not be resolved to a string.