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

http://github.com/philiplaureano/LinFu · C# · 35 lines · 10 code · 2 blank · 23 comment · 0 complexity · 1530113731ce4716ca8956942afe7968 MD5 · raw file

  1. using System;
  2. using LinFu.IoC.Interfaces;
  3. namespace LinFu.IoC.Configuration.Interfaces
  4. {
  5. /// <summary>
  6. /// Represents a fluent class that creates
  7. /// a method that initializes a <typeparamref name="TService" />
  8. /// instance.
  9. /// </summary>
  10. /// <typeparam name="TService">The service type being instantiated.</typeparam>
  11. public interface IPropertyInjectionLambda<TService>
  12. {
  13. /// <summary>
  14. /// Initializes service instances with the given
  15. /// <paramref name="action" />.
  16. /// </summary>
  17. /// <param name="action">
  18. /// An <see cref="Action{TService}" /> delegate that will be used to initialize newly created
  19. /// services.
  20. /// </param>
  21. void With(Action<TService> action);
  22. /// <summary>
  23. /// Uses an action delegate to initialize a given service using
  24. /// the given <see cref="IServiceContainer" /> and <typeparamref name="TService" />
  25. /// instances.
  26. /// </summary>
  27. /// <param name="action">
  28. /// An <see cref="Func{IServiceContainer, TService}" /> delegate that will be used to initialize newly
  29. /// created services.
  30. /// </param>
  31. void With(Action<IServiceContainer, TService> action);
  32. }
  33. }