public MethodReference ImportMethod(MethodPatcher toImport) { return mainModule.Import(toImport.methodDefinition); }
public MethodPatcher InsertCallBefore(Instruction before, MethodPatcher method) { return(InsertBefore(before, Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)))); }
public MethodPatcher InsertCallBefore(int before, MethodPatcher method) { return(InsertCallBefore(IlProc.Body.Instructions[before], method)); }
public MethodPatcher InsertCallAfter(int after, MethodPatcher method) { return(InsertCallAfter(IlProc.Body.Instructions[after], method)); }
public MethodPatcher InsertCallBeforeRet(MethodPatcher method) { return(InsertBefore(IlProc.Body.Instructions[IlProc.Body.Instructions.Count - 1], Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)))); }
public MethodPatcher AppendCall(MethodPatcher method) { return(Append(Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)))); }
public MethodPatcher InsertCallAfter(Instruction after, MethodPatcher method) { return(InsertAfter(after, Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)))); }
public MethodPatcher InsertCallBefore(int before, MethodPatcher method) => InsertCallBefore(IlProc.Body.Instructions[before], method);
public MethodReference ImportMethod(MethodPatcher toImport) { return(mainModule.Import(toImport.methodDefinition)); }
public MethodPatcher InsertCallBefore(Instruction before, MethodPatcher method) => InsertBefore(before, Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)));
public MethodPatcher InsertCallBeforeRet(MethodPatcher method) => InsertBefore(IlProc.Body.Instructions[IlProc.Body.Instructions.Count - 1], Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)));
public MethodPatcher InsertCallAfter(int after, MethodPatcher method) => InsertCallAfter(IlProc.Body.Instructions[after], method);
public MethodPatcher InsertCallAfter(Instruction after, MethodPatcher method) => InsertAfter(after, Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)));
public MethodPatcher AppendCall(MethodPatcher method) => Append(Instruction.Create(OpCodes.Call, rootAssemblyPatcher.ImportMethod(method)));