/src/LinFu.IoC/Configuration/ContainerActivationContext.cs
C# | 34 lines | 17 code | 3 blank | 14 comment | 0 complexity | 847380b5987708985577b7ff180ccf91 MD5 | raw file
1using System; 2using LinFu.AOP.Interfaces; 3using LinFu.IoC.Configuration.Interfaces; 4using LinFu.IoC.Interfaces; 5using ActivationContext = LinFu.AOP.Interfaces.ActivationContext; 6 7namespace LinFu.IoC.Configuration 8{ 9 /// <summary> 10 /// Represents a class that describes a request to instantiate a particular object type using a given 11 /// <see cref="IServiceContainer" /> instance. 12 /// </summary> 13 public class ContainerActivationContext : ActivationContext, IContainerActivationContext 14 { 15 /// <summary> 16 /// Initializes the class with the given parameters. 17 /// </summary> 18 /// <param name="concreteType">The type to be instantiated.</param> 19 /// <param name="container">The container that will be used to instantiate the target type.</param> 20 /// <param name="additionalArguments">The additional arguments that must be passed to the constructor.</param> 21 public ContainerActivationContext(Type concreteType, IServiceContainer container, object[] additionalArguments) 22 : base(concreteType, additionalArguments) 23 { 24 Container = container; 25 } 26 27 28 /// <summary> 29 /// Gets the value indicating the <see cref="IServiceContainer" /> instance 30 /// that will instantiate the <see cref="IActivationContext.TargetType" />. 31 /// </summary> 32 public IServiceContainer Container { get; } 33 } 34}