/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
- using System;
- using System.Diagnostics;
- using System.Reflection;
- namespace LinFu.AOP.Interfaces
- {
- /// <summary>
- /// Represents the information associated with
- /// a single method call.
- /// </summary>
- public interface IInvocationInfo
- {
- /// <summary>
- /// The target instance currently being called.
- /// </summary>
- /// <remarks>This typically is a reference to a proxy object.</remarks>
- object Target { get; }
- /// <summary>
- /// The method currently being called.
- /// </summary>
- MethodBase TargetMethod { get; }
- /// <summary>
- /// The return type of the <see cref="TargetMethod" />.
- /// </summary>
- Type ReturnType { get; }
- /// <summary>
- /// The <see cref="StackTrace" /> associated
- /// with the method call when the call was made.
- /// </summary>
- StackTrace StackTrace { get; }
- /// <summary>
- /// The parameter types for the current target method.
- /// </summary>
- /// <remarks>
- /// <para>
- /// This could be very useful in cases where the actual target method
- /// is based on a generic type definition. In such cases,
- /// the <see cref="IInvocationInfo" /> instance needs to be able
- /// to describe the actual parameter types being used by the
- /// current generic type instantiation. This property helps
- /// users determine which parameter types are actually being used
- /// at the time of the method call.
- /// </para>
- /// </remarks>
- Type[] ParameterTypes { get; }
- /// <summary>
- /// If the <see cref="TargetMethod" /> method is a generic method,
- /// this will hold the generic type arguments used to construct the
- /// method.
- /// </summary>
- Type[] TypeArguments { get; }
- /// <summary>
- /// The arguments used in the method call.
- /// </summary>
- object[] Arguments { get; }
- }
- }