Table of Contents

Class CilDispatcher

Namespace
Echo.Platforms.AsmResolver.Emulation.Dispatch
Assembly
Echo.Platforms.AsmResolver.dll

Provides a mechanism for dispatching instructions to their respective handlers.

public class CilDispatcher
Inheritance
CilDispatcher
Inherited Members

Properties

DispatcherTable

Gets the table that is used for dispatching instructions by their mnemonic.

public Dictionary<CilCode, ICilOpCodeHandler> DispatcherTable { get; }

Property Value

Dictionary<CilCode, ICilOpCodeHandler>

Methods

Dispatch(CilExecutionContext, CilInstruction)

Dispatches and evaluates a single instruction.

public CilDispatchResult Dispatch(CilExecutionContext context, CilInstruction instruction)

Parameters

context CilExecutionContext

The context to evaluate the instruction in.

instruction CilInstruction

The instruction to dispatch and evaluate.

Returns

CilDispatchResult

A value indicating whether the dispatch was successful or caused an error.

Exceptions

NotSupportedException

Occurs when an operation was not supported by the dispatcher.

OnAfterInstructionDispatch(CilDispatchEventArgs)

Fires the AfterInstructionDispatch event.

protected virtual void OnAfterInstructionDispatch(CilDispatchEventArgs e)

Parameters

e CilDispatchEventArgs

The event arguments.

OnBeforeInstructionDispatch(CilDispatchEventArgs)

Fires the BeforeInstructionDispatch event.

protected virtual void OnBeforeInstructionDispatch(CilDispatchEventArgs e)

Parameters

e CilDispatchEventArgs

The event arguments.

Events

AfterInstructionDispatch

Fires after an instruction gets dispatched.

public event EventHandler<CilDispatchEventArgs>? AfterInstructionDispatch

Event Type

EventHandler<CilDispatchEventArgs>

BeforeInstructionDispatch

Fires before an instruction gets dispatched.

public event EventHandler<CilDispatchEventArgs>? BeforeInstructionDispatch

Event Type

EventHandler<CilDispatchEventArgs>