/src/LinFu.IoC/Interfaces/IGetService.cs

http://github.com/philiplaureano/LinFu · C# · 16 lines · 7 code · 0 blank · 9 comment · 0 complexity · 530b830e224b20ee93218c77080fdf37 MD5 · raw file

  1. namespace LinFu.IoC.Interfaces
  2. {
  3. /// <summary>
  4. /// Represents a class that determines the behavior a <see cref="ServiceContainer" /> instance.
  5. /// </summary>
  6. public interface IGetService
  7. {
  8. /// <summary>
  9. /// Causes the container to instantiate the service using the given
  10. /// <paramref name="serviceRequest">service request</paramref>. If the service type cannot be created, it will simply
  11. /// return null.
  12. /// </summary>
  13. /// <returns>A valid object reference if the service can be created; otherwise, it will return <c>null</c></returns>
  14. object GetService(IServiceRequest serviceRequest);
  15. }
  16. }