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