C# Class Mono.Cecil.Inject.ILUtils

Miscellaneous utilities used by the injector.
Afficher le fichier Open project: denikson/Mono.Cecil.Inject Class Usage Examples

Méthodes publiques

Méthode Description
CopyInstruction ( Instruction ins ) : Instruction

Creates a new IL instruction that is a copy of the provided one. Does not link the new instruction to a method.

ReplaceInstruction ( Instruction original, Instruction newIns ) : void

Replaces the insturction with another by replacing the opcode and the operand. Unlike ILProcessor.Replace, preserves the references to the original instruction (which branches might use, for instance).

Method Details

CopyInstruction() public static méthode

Creates a new IL instruction that is a copy of the provided one. Does not link the new instruction to a method.
public static CopyInstruction ( Instruction ins ) : Instruction
ins Mono.Cecil.Cil.Instruction Instruction to copy.
Résultat Mono.Cecil.Cil.Instruction

ReplaceInstruction() public static méthode

Replaces the insturction with another by replacing the opcode and the operand. Unlike ILProcessor.Replace, preserves the references to the original instruction (which branches might use, for instance).
public static ReplaceInstruction ( Instruction original, Instruction newIns ) : void
original Mono.Cecil.Cil.Instruction The instruction to replace.
newIns Mono.Cecil.Cil.Instruction The instruction to replace with.
Résultat void