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

http://github.com/philiplaureano/LinFu · C# · 30 lines · 10 code · 3 blank · 17 comment · 0 complexity · fee445766cbda582920ee3bc567e0862 MD5 · raw file

  1. using LinFu.IoC.Factories;
  2. namespace LinFu.IoC.Configuration
  3. {
  4. /// <summary>
  5. /// Represents a fluent class that allows
  6. /// users to create specific types of factories.
  7. /// </summary>
  8. /// <typeparam name="TService">The type of service being created.</typeparam>
  9. public interface IGenerateFactory<TService>
  10. {
  11. /// <summary>
  12. /// Creates a singleton factory.
  13. /// </summary>
  14. /// <seealso cref="SingletonFactory{T}" />
  15. void AsSingleton();
  16. /// <summary>
  17. /// Creates a once per thread factory.
  18. /// </summary>
  19. /// <seealso cref="OncePerThreadFactory{T}" />
  20. void OncePerThread();
  21. /// <summary>
  22. /// Creates a once per request factory.
  23. /// </summary>
  24. /// <seealso cref="OncePerRequestFactory{T}" />
  25. void OncePerRequest();
  26. }
  27. }