IScheduledTaskWorker.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using MediaBrowser.Model.Events;
  2. using MediaBrowser.Model.Tasks;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace MediaBrowser.Common.ScheduledTasks
  6. {
  7. /// <summary>
  8. /// Interface IScheduledTaskWorker
  9. /// </summary>
  10. public interface IScheduledTaskWorker : IDisposable
  11. {
  12. /// <summary>
  13. /// Occurs when [task progress].
  14. /// </summary>
  15. event EventHandler<GenericEventArgs<double>> TaskProgress;
  16. /// <summary>
  17. /// Gets or sets the scheduled task.
  18. /// </summary>
  19. /// <value>The scheduled task.</value>
  20. IScheduledTask ScheduledTask { get; }
  21. /// <summary>
  22. /// Gets the last execution result.
  23. /// </summary>
  24. /// <value>The last execution result.</value>
  25. TaskResult LastExecutionResult { get; }
  26. /// <summary>
  27. /// Gets the name.
  28. /// </summary>
  29. /// <value>The name.</value>
  30. string Name { get; }
  31. /// <summary>
  32. /// Gets the description.
  33. /// </summary>
  34. /// <value>The description.</value>
  35. string Description { get; }
  36. /// <summary>
  37. /// Gets the category.
  38. /// </summary>
  39. /// <value>The category.</value>
  40. string Category { get; }
  41. /// <summary>
  42. /// Gets the state.
  43. /// </summary>
  44. /// <value>The state.</value>
  45. TaskState State { get; }
  46. /// <summary>
  47. /// Gets the current progress.
  48. /// </summary>
  49. /// <value>The current progress.</value>
  50. double? CurrentProgress { get; }
  51. /// <summary>
  52. /// Gets the triggers that define when the task will run
  53. /// </summary>
  54. /// <value>The triggers.</value>
  55. /// <exception cref="System.ArgumentNullException">value</exception>
  56. IEnumerable<ITaskTrigger> Triggers { get; set; }
  57. /// <summary>
  58. /// Gets the unique id.
  59. /// </summary>
  60. /// <value>The unique id.</value>
  61. string Id { get; }
  62. }
  63. }