/src/LinFu.AOP/Interfaces/IMethodBodyRewriter.cs

http://github.com/philiplaureano/LinFu · C# · 20 lines · 10 code · 1 blank · 9 comment · 0 complexity · 467bbdaf92906745a359d983ab958894 MD5 · raw file

  1. using System.Collections.Generic;
  2. using Mono.Cecil;
  3. using Mono.Cecil.Cil;
  4. namespace LinFu.AOP.Cecil.Interfaces
  5. {
  6. /// <summary>
  7. /// Represents a type that can modify method bodies.
  8. /// </summary>
  9. public interface IMethodBodyRewriter
  10. {
  11. /// <summary>
  12. /// Rewrites a target method using the given ILProcessor.
  13. /// </summary>
  14. /// <param name="method">The target method.</param>
  15. /// <param name="IL">The ILProcessor that will be used to rewrite the target method.</param>
  16. /// <param name="oldInstructions">The original instructions from the target method body.</param>
  17. void Rewrite(MethodDefinition method, ILProcessor IL, IEnumerable<Instruction> oldInstructions);
  18. }
  19. }