ITaskTrigger.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using MediaBrowser.Model.Events;
  3. namespace MediaBrowser.Common.ScheduledTasks
  4. {
  5. /// <summary>
  6. /// Interface ITaskTrigger
  7. /// </summary>
  8. public interface ITaskTrigger
  9. {
  10. /// <summary>
  11. /// Fires when the trigger condition is satisfied and the task should run
  12. /// </summary>
  13. event EventHandler<GenericEventArgs<TaskExecutionOptions>> Triggered;
  14. /// <summary>
  15. /// Stars waiting for the trigger action
  16. /// </summary>
  17. /// <param name="isApplicationStartup">if set to <c>true</c> [is application startup].</param>
  18. void Start(bool isApplicationStartup);
  19. /// <summary>
  20. /// Stops waiting for the trigger action
  21. /// </summary>
  22. void Stop();
  23. /// <summary>
  24. /// Gets or sets the execution properties of this task.
  25. /// </summary>
  26. /// <value>
  27. /// The execution properties of this task.
  28. /// </value>
  29. TaskExecutionOptions TaskOptions { get; set; }
  30. }
  31. }