Table of Contents

Class ListInstructionProvider<TInstruction>

Namespace
Echo.Code
Assembly
Echo.dll

Wraps a simple collection of instructions in a basic implementation of an IStaticInstructionProvider<TInstruction>.

public class ListInstructionProvider<TInstruction> : IStaticInstructionProvider<TInstruction> where TInstruction : notnull

Type Parameters

TInstruction

The type of instructions to store.

Inheritance
ListInstructionProvider<TInstruction>
Implements
Inherited Members

Constructors

ListInstructionProvider(IArchitecture<TInstruction>, IEnumerable<TInstruction>)

Creates a new wrapper for a sequence of instructions.

public ListInstructionProvider(IArchitecture<TInstruction> architecture, IEnumerable<TInstruction> instructions)

Parameters

architecture IArchitecture<TInstruction>

The instruction architecture.

instructions IEnumerable<TInstruction>

The instructions to put into the wrapper.

Exceptions

ArgumentException

Occurs when there are multiple instructions with the same offset.

ArgumentNullException

Occurs when the provided instruction sequence is null.

Properties

Architecture

Gets the architecture describing the instructions exposed by this instruction provider.

public IArchitecture<TInstruction> Architecture { get; }

Property Value

IArchitecture<TInstruction>

Methods

GetInstructionAtOffset(long)

Gets the instruction at the provided address.

public TInstruction GetInstructionAtOffset(long offset)

Parameters

offset long

The address of the instruction to get.

Returns

TInstruction

The instruction at the provided address.