/src/LinFu.IoC.Common/LifecycleType.cs

http://github.com/philiplaureano/LinFu · C# · 28 lines · 9 code · 2 blank · 17 comment · 0 complexity · 70002b0c480b60d3b4a08f162a02ca93 MD5 · raw file

  1. namespace LinFu.IoC.Configuration
  2. {
  3. /// <summary>
  4. /// An enumeration that denotes the instance behavior
  5. /// of a particular object reference.
  6. /// </summary>
  7. public enum LifecycleType
  8. {
  9. /// <summary>
  10. /// This means that a new object instance
  11. /// will be created on each call.
  12. /// </summary>
  13. OncePerRequest = 0,
  14. /// <summary>
  15. /// This means that a new object instance
  16. /// will be created only once per thread.
  17. /// </summary>
  18. OncePerThread = 1,
  19. /// <summary>
  20. /// This means that only a single object instance
  21. /// will ever be created in spite of the number of
  22. /// subsequent requests for a new object instance.
  23. /// </summary>
  24. Singleton = 2
  25. }
  26. }