public static IEnumerable <CodeInstruction> SetPrivateInstanceVariableTranspiler(IEnumerable <CodeInstruction> instr) { MethodInfo info = typeof(DummyModClass).GetMethod("SetPrivateInstanceVariable"); ILTool parser = new ILTool(instr); parser.ReplaceMethod(info); return(parser.instructions); }
public static IEnumerable <CodeInstruction> ReplaceMethodTranspiler(IEnumerable <CodeInstruction> instr) { MethodInfo info = typeof(DummyModClass).GetMethod("SomeMethod"); ILTool tool = new ILTool(instr); tool.ReplaceMethod(info); return(tool.instructions); }