LibraryMonitorStartup.cs 954 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Threading.Tasks;
  2. using MediaBrowser.Controller.Library;
  3. using MediaBrowser.Controller.Plugins;
  4. namespace Emby.Server.Implementations.IO
  5. {
  6. /// <summary>
  7. /// <see cref="IServerEntryPoint" /> which is responsible for starting the library monitor.
  8. /// </summary>
  9. public sealed class LibraryMonitorStartup : IServerEntryPoint
  10. {
  11. private readonly ILibraryMonitor _monitor;
  12. /// <summary>
  13. /// Initializes a new instance of the <see cref="LibraryMonitorStartup"/> class.
  14. /// </summary>
  15. /// <param name="monitor">The library monitor.</param>
  16. public LibraryMonitorStartup(ILibraryMonitor monitor)
  17. {
  18. _monitor = monitor;
  19. }
  20. /// <inheritdoc />
  21. public Task RunAsync()
  22. {
  23. _monitor.Start();
  24. return Task.CompletedTask;
  25. }
  26. /// <inheritdoc />
  27. public void Dispose()
  28. {
  29. }
  30. }
  31. }