ITaskTrigger.cs 1013 B

1234567891011121314151617181920212223242526272829303132333435
  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<GenericEventArgs<TaskExecutionOptions>> Triggered;
  15. /// <summary>
  16. /// Stars waiting for the trigger action
  17. /// </summary>
  18. void Start(TaskResult lastResult, ILogger logger, string taskName, 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. }