/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

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