/src/LinFu.AOP/Interfaces/IMethodFilter.cs

http://github.com/philiplaureano/LinFu · C# · 17 lines · 8 code · 1 blank · 8 comment · 0 complexity · 1e8421f2d0859c7338f898986529e40b MD5 · raw file

  1. using Mono.Cecil;
  2. namespace LinFu.AOP.Cecil.Interfaces
  3. {
  4. /// <summary>
  5. /// Represents a type that determines which host methods should be modified for method call interception.
  6. /// </summary>
  7. public interface IMethodFilter
  8. {
  9. /// <summary>
  10. /// Determines whether or not a particular method should be modified.
  11. /// </summary>
  12. /// <param name="targetMethod">The target method to be modified.</param>
  13. /// <returns>Returns <c>true</c> if the method should be modified; otherwise, it will return <c>false</c>.</returns>
  14. bool ShouldWeave(MethodReference targetMethod);
  15. }
  16. }