Class ListInstructionProvider<TInstruction>
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
TInstructionThe type of instructions to store.
- Inheritance
-
ListInstructionProvider<TInstruction>
- Implements
-
IStaticInstructionProvider<TInstruction>
- 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
architectureIArchitecture<TInstruction>The instruction architecture.
instructionsIEnumerable<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
offsetlongThe address of the instruction to get.
Returns
- TInstruction
The instruction at the provided address.