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

/src/LinFu.AOP.Interfaces/ActivationContext.cs

http://github.com/philiplaureano/LinFu
C# | 32 lines | 14 code | 4 blank | 14 comment | 0 complexity | 372614da0d469f0ebc610b96fe99ba39 MD5 | raw file
 1using System;
 2
 3namespace LinFu.AOP.Interfaces
 4{
 5    /// <summary>
 6    ///     Represents a class that describes a request to instantiate a particular object type.
 7    /// </summary>
 8    public class ActivationContext : IActivationContext
 9    {
10        /// <summary>
11        ///     Initializes the context with the given parameters.
12        /// </summary>
13        /// <param name="concreteType">The type to be instantiated.</param>
14        /// <param name="additionalArguments">The additional arguments that must be passed to the constructor.</param>
15        public ActivationContext(Type concreteType, object[] additionalArguments)
16        {
17            TargetType = concreteType;
18            AdditionalArguments = additionalArguments;
19        }
20
21
22        /// <summary>
23        ///     Gets the value indicating the type to be instantiated.
24        /// </summary>
25        public Type TargetType { get; }
26
27        /// <summary>
28        ///     Gets the value indicating the arguments that will be passed to the constructor during instantiation.
29        /// </summary>
30        public object[] AdditionalArguments { get; }
31    }
32}