PageRenderTime 24ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/src/LinFu.AOP/Interfaces/INewInstanceFilter.cs

http://github.com/philiplaureano/LinFu
C# | 19 lines | 8 code | 1 blank | 10 comment | 0 complexity | bb68c8f9720b1d2030587220524d742d MD5 | raw file
  1. using Mono.Cecil;
  2. namespace LinFu.AOP.Cecil.Interfaces
  3. {
  4. /// <summary>
  5. /// Represents a type that determines the constructor calls that will be intercepted by the postweaver.
  6. /// </summary>
  7. public interface INewInstanceFilter
  8. {
  9. /// <summary>
  10. /// Determines whether or not a particular constructor call should be intercepted by the postweaver.
  11. /// </summary>
  12. /// <param name="currentConstructor">The constructor used to instantiate the current instance.</param>
  13. /// <param name="concreteType">The concrete type that contains the new instance call.</param>
  14. /// <param name="hostMethod">The host method that contains the new operator call.</param>
  15. /// <returns>Returns <c>true</c> if the new operator call should be intercepted; otherwise, it should return <c>false</c>.</returns>
  16. bool ShouldWeave(MethodReference currentConstructor, TypeReference concreteType, MethodReference hostMethod);
  17. }
  18. }