PageRenderTime 4ms CodeModel.GetById 2ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/src/LinFu.AOP/Interfaces/IMethodCallFilter.cs

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