/src/LinFu.IoC/Configuration/ContainerActivationContext.cs

http://github.com/philiplaureano/LinFu · C# · 34 lines · 17 code · 3 blank · 14 comment · 0 complexity · 847380b5987708985577b7ff180ccf91 MD5 · raw file

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