ITaskTrigger.cs 717 B

1234567891011121314151617181920212223242526
  1. using System;
  2. namespace MediaBrowser.Common.ScheduledTasks
  3. {
  4. /// <summary>
  5. /// Interface ITaskTrigger
  6. /// </summary>
  7. public interface ITaskTrigger
  8. {
  9. /// <summary>
  10. /// Fires when the trigger condition is satisfied and the task should run
  11. /// </summary>
  12. event EventHandler<EventArgs> Triggered;
  13. /// <summary>
  14. /// Stars waiting for the trigger action
  15. /// </summary>
  16. /// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
  17. void Start(bool isApplicationStartup);
  18. /// <summary>
  19. /// Stops waiting for the trigger action
  20. /// </summary>
  21. void Stop();
  22. }
  23. }