/src/LinFu.IoC/Interfaces/ICreateInstance.cs

http://github.com/philiplaureano/LinFu · C# · 20 lines · 7 code · 0 blank · 13 comment · 0 complexity · 5dae379b98464da3920b4938a3bc0de5 MD5 · raw file

  1. namespace LinFu.IoC.Interfaces
  2. {
  3. /// <summary>
  4. /// Represents a type that can create service instances from a given <see cref="IFactory" /> instance and
  5. /// <see cref="IFactoryRequest" />.
  6. /// </summary>
  7. public interface ICreateInstance
  8. {
  9. /// <summary>
  10. /// Creates a service instance using the given <paramref name="factoryRequest" /> and <see cref="IFactory" /> instance.
  11. /// </summary>
  12. /// <param name="factoryRequest">
  13. /// The <see cref="IFactoryRequest" /> instance that describes the context of the service
  14. /// request.
  15. /// </param>
  16. /// <param name="factory">The <see cref="IFactory" /> instance that will be used to instantiate the service type.</param>
  17. /// <returns>A valid service instance.</returns>
  18. object CreateFrom(IFactoryRequest factoryRequest, IFactory factory);
  19. }
  20. }