PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 2ms RepoModel.GetById 39ms app.codeStats 0ms

/src/LinFu.AOP.Interfaces/IInvocationInfo.cs

http://github.com/philiplaureano/LinFu
C# | 63 lines | 16 code | 7 blank | 40 comment | 0 complexity | 10c8c44e57d2aca8408a9b39e89f28bf MD5 | raw file
 1using System;
 2using System.Diagnostics;
 3using System.Reflection;
 4
 5namespace LinFu.AOP.Interfaces
 6{
 7    /// <summary>
 8    ///     Represents the information associated with
 9    ///     a single method call.
10    /// </summary>
11    public interface IInvocationInfo
12    {
13        /// <summary>
14        ///     The target instance currently being called.
15        /// </summary>
16        /// <remarks>This typically is a reference to a proxy object.</remarks>
17        object Target { get; }
18
19        /// <summary>
20        ///     The method currently being called.
21        /// </summary>
22        MethodBase TargetMethod { get; }
23
24        /// <summary>
25        ///     The return type of the <see cref="TargetMethod" />.
26        /// </summary>
27        Type ReturnType { get; }
28
29        /// <summary>
30        ///     The <see cref="StackTrace" /> associated
31        ///     with the method call when the call was made.
32        /// </summary>
33        StackTrace StackTrace { get; }
34
35        /// <summary>
36        ///     The parameter types for the current target method.
37        /// </summary>
38        /// <remarks>
39        ///     <para>
40        ///         This could be very useful in cases where the actual target method
41        ///         is based on a generic type definition. In such cases,
42        ///         the <see cref="IInvocationInfo" /> instance needs to be able
43        ///         to describe the actual parameter types being used by the
44        ///         current generic type instantiation. This property helps
45        ///         users determine which parameter types are actually being used
46        ///         at the time of the method call.
47        ///     </para>
48        /// </remarks>
49        Type[] ParameterTypes { get; }
50
51        /// <summary>
52        ///     If the <see cref="TargetMethod" /> method is a generic method,
53        ///     this will hold the generic type arguments used to construct the
54        ///     method.
55        /// </summary>
56        Type[] TypeArguments { get; }
57
58        /// <summary>
59        ///     The arguments used in the method call.
60        /// </summary>
61        object[] Arguments { get; }
62    }
63}