Пример #1
0
            public override void Patch(MethodDefinition source)
            {
                ILProcessor il = source.Body.GetILProcessor();

                il.ClearInstructions();
                il.ClearVariables();
                il.Append(il.CreateCallInstruction(TargetMethod));
                il.Emit(OpCodes.Ret);
            }