PageRenderTime 20ms CodeModel.GetById 14ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/LinFu.AOP/Interfaces/IMethodBodyRewriterParameters.cs

http://github.com/philiplaureano/LinFu
C# | 76 lines | 21 code | 10 blank | 45 comment | 0 complexity | 646f52009fbabca2bb9cb8165d3bd42d MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using LinFu.AOP.Interfaces;
 4using Mono.Cecil;
 5using Mono.Cecil.Cil;
 6
 7namespace LinFu.AOP.Cecil
 8{
 9    /// <summary>
10    ///     Represents the parameters used to add interception to a given method body.
11    /// </summary>
12    public interface IMethodBodyRewriterParameters
13    {
14        /// <summary>
15        ///     Gets the value indicating the TargetMethod to be modified.
16        /// </summary>
17        /// <value>The method to be modified.</value>
18        MethodDefinition TargetMethod { get; }
19
20        /// <summary>
21        ///     Gets the value indicating the local variable used to store the <see cref="IAroundInvokeProvider" /> instance.
22        /// </summary>
23        /// <value>The <see cref="IAroundInvokeProvider" /> instance.</value>
24        VariableDefinition AroundInvokeProvider { get; }
25
26        /// <summary>
27        ///     Gets the value indicating the local variable used to store the <see cref="IMethodReplacementProvider" /> instance.
28        /// </summary>
29        /// <value>The <see cref="IMethodReplacementProvider" /> instance.</value>
30        VariableDefinition MethodReplacementProvider { get; }
31
32        /// <summary>
33        ///     Gets the value indicating the class-level<see cref="IMethodReplacementProvider" /> instance.
34        /// </summary>
35        /// <value>The class-level<see cref="IMethodReplacementProvider" /> instance.</value>
36        VariableDefinition ClassMethodReplacementProvider { get; }
37
38        /// <summary>
39        ///     Gets the value indicating the local variable that will store the value that determines whether or not
40        ///     interception is disabled.
41        /// </summary>
42        /// <value>The value that determines whether or not interception is disabled.</value>
43        VariableDefinition InterceptionDisabled { get; }
44
45        /// <summary>
46        ///     Gets the value indicating the local variable that will store the <see cref="IInvocationInfo" /> instance.
47        /// </summary>
48        /// <value>The local variable that will store the <see cref="IInvocationInfo" /> instance.</value>
49        VariableDefinition InvocationInfo { get; }
50
51        /// <summary>
52        ///     Gets the value indicating the local variable that will store the return value.
53        /// </summary>
54        /// <value>The value indicating the local variable that will store the return value.</value>
55        VariableDefinition ReturnValue { get; }
56
57        /// <summary>
58        ///     Gets the value indicating the interception registry type that will be responsible for handling class-level
59        ///     interception events.
60        /// </summary>
61        /// <value>The interception registry type that will be responsible for handling class-level interception events.</value>
62        Type RegistryType { get; }
63
64        /// <summary>
65        ///     Gets the value indicating the functor that resolves the GetMethodReplacementProvider method.
66        /// </summary>
67        /// <value>The functor that resolves the GetMethodReplacementProvider method.</value>
68        Func<ModuleDefinition, MethodReference> GetMethodReplacementProviderMethod { get; }
69
70        /// <summary>
71        ///     Gets the value indicating the list of old instructions in the current method body.
72        /// </summary>
73        /// <value>The value indicating the list of old instructions in the current method body.</value>
74        IEnumerable<Instruction> OldInstructions { get; }
75    }
76}