ITaskTrigger.cs 870 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using MediaBrowser.Model.Events;
  3. using MediaBrowser.Model.Logging;
  4. namespace MediaBrowser.Model.Tasks
  5. {
  6. /// <summary>
  7. /// Interface ITaskTrigger
  8. /// </summary>
  9. public interface ITaskTrigger
  10. {
  11. /// <summary>
  12. /// Fires when the trigger condition is satisfied and the task should run
  13. /// </summary>
  14. event EventHandler<EventArgs> Triggered;
  15. /// <summary>
  16. /// Gets or sets the options of this task.
  17. /// </summary>
  18. TaskOptions TaskOptions { get; set; }
  19. /// <summary>
  20. /// Stars waiting for the trigger action
  21. /// </summary>
  22. void Start(TaskResult lastResult, ILogger logger, string taskName, bool isApplicationStartup);
  23. /// <summary>
  24. /// Stops waiting for the trigger action
  25. /// </summary>
  26. void Stop();
  27. }
  28. }