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

http://github.com/philiplaureano/LinFu · C# · 22 lines · 9 code · 1 blank · 12 comment · 0 complexity · ba499e60970050a1a835740a1af96ada MD5 · raw file

  1. using System;
  2. using LinFu.IoC.Interfaces;
  3. namespace LinFu.IoC.Configuration.Interfaces
  4. {
  5. /// <summary>
  6. /// Represents a class that can generate <see cref="IFactory" /> instances
  7. /// from a given service type, implementing type, and lifecycle.
  8. /// </summary>
  9. public interface IFactoryBuilder
  10. {
  11. /// <summary>
  12. /// Generates a <see cref="IFactory" /> instance that can create the <paramref name="serviceType" />
  13. /// using the <paramref name="implementingType" /> and <paramref name="lifecycle" /> model.
  14. /// </summary>
  15. /// <param name="serviceType">The service type that will be created by the factory.</param>
  16. /// <param name="implementingType">The concrete type that will provide the implementation for the service type.</param>
  17. /// <param name="lifecycle">The instancing behavior of the given service type.</param>
  18. /// <returns>A valid <see cref="IFactory" /> instance.</returns>
  19. IFactory CreateFactory(Type serviceType, Type implementingType, LifecycleType lifecycle);
  20. }
  21. }