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
Methods
Dispatch(CilExecutionContext, CilInstruction)
Dispatches and evaluates a single instruction.
public CilDispatchResult Dispatch(CilExecutionContext context, CilInstruction instruction)
Parameters
contextCilExecutionContextThe context to evaluate the instruction in.
instructionCilInstructionThe 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
eCilDispatchEventArgsThe event arguments.
OnBeforeInstructionDispatch(CilDispatchEventArgs)
Fires the BeforeInstructionDispatch event.
protected virtual void OnBeforeInstructionDispatch(CilDispatchEventArgs e)
Parameters
eCilDispatchEventArgsThe event arguments.
Events
AfterInstructionDispatch
Fires after an instruction gets dispatched.
public event EventHandler<CilDispatchEventArgs>? AfterInstructionDispatch
Event Type
BeforeInstructionDispatch
Fires before an instruction gets dispatched.
public event EventHandler<CilDispatchEventArgs>? BeforeInstructionDispatch