private void FillRemoveWatchdog(Mono.Cecil.Cil.ILProcessor ilRemoveWatchdog) { Instruction ldarg = Instruction.Create(OpCodes.Ldarg_0); FieldReference targetField = new FieldReference("_computerTarget", GetCommonTingComputer(), _target); Instruction targetToStack = Instruction.Create(OpCodes.Ldfld, targetField); MethodReference injectoid = _source.Methods.First(o=>o.Name == "RemoveWatchdog"); injectoid = _target.Module.Import(injectoid); Instruction callInjectoid = Instruction.Create(OpCodes.Call, injectoid); Instruction ret = Instruction.Create(OpCodes.Ret); ilRemoveWatchdog.Append(ldarg); ilRemoveWatchdog.Append(targetToStack); ilRemoveWatchdog.Append(callInjectoid); ilRemoveWatchdog.Append(ret); }