/src/LinFu.IoC/ServiceRequestResult.cs

http://github.com/philiplaureano/LinFu · C# · 45 lines · 14 code · 6 blank · 25 comment · 0 complexity · e6efca3ef2192dc44f77d5e096cd3bb7 MD5 · raw file

  1. using System;
  2. using LinFu.IoC.Interfaces;
  3. namespace LinFu.IoC
  4. {
  5. /// <summary>
  6. /// Represents the results returned when a service request
  7. /// is made against an <see cref="IContainer" /> instance.
  8. /// </summary>
  9. internal class ServiceRequestResult : IServiceRequestResult
  10. {
  11. /// <summary>
  12. /// The name of the service being created. By default, this property is blank.
  13. /// </summary>
  14. public string ServiceName { get; internal set; }
  15. /// <summary>
  16. /// The raw object reference created by the container itself.
  17. /// </summary>
  18. public object OriginalResult { get; internal set; }
  19. /// <summary>
  20. /// The result that will be returned from the container
  21. /// instead of the <see cref="OriginalResult" />.
  22. /// If this property is null, then the original result will be used.
  23. /// </summary>
  24. public object ActualResult { get; set; }
  25. /// <summary>
  26. /// The type of service being requested.
  27. /// </summary>
  28. public Type ServiceType { get; internal set; }
  29. /// <summary>
  30. /// The container that will handle the service request.
  31. /// </summary>
  32. public IServiceContainer Container { get; internal set; }
  33. /// <summary>
  34. /// Gets or sets the value indicating the additional arguments that
  35. /// were used during the service request.
  36. /// </summary>
  37. public object[] AdditionalArguments { get; internal set; }
  38. }
  39. }