/src/LinFu.IoC/Configuration/Interfaces/IArgumentResolver.cs

http://github.com/philiplaureano/LinFu · C# · 23 lines · 10 code · 1 blank · 12 comment · 0 complexity · 85db7429d26e152c6ac03840ab914c9f MD5 · raw file

  1. using System.Collections.Generic;
  2. using LinFu.IoC.Interfaces;
  3. namespace LinFu.IoC.Configuration.Interfaces
  4. {
  5. /// <summary>
  6. /// Represents a type that can generate method arguments
  7. /// from an existing <see cref="IServiceContainer" /> instance.
  8. /// </summary>
  9. public interface IArgumentResolver
  10. {
  11. /// <summary>
  12. /// Generates constructor arguments from the given <paramref name="parameterTypes" />
  13. /// and <paramref name="container" />.
  14. /// </summary>
  15. /// <param name="parameterTypes">The parameter types for the target method.</param>
  16. /// <param name="container">The container that will provide the method arguments.</param>
  17. /// <param name="additionalArguments">The additional arguments that will be passed to the target method.</param>
  18. /// <returns>An array of objects that represent the arguments to be passed to the target method.</returns>
  19. object[] ResolveFrom(IEnumerable<INamedType> parameterTypes, IServiceContainer container,
  20. params object[] additionalArguments);
  21. }
  22. }