IScheduledTask.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace MediaBrowser.Model.Tasks
  7. {
  8. /// <summary>
  9. /// Interface IScheduledTaskWorker
  10. /// </summary>
  11. public interface IScheduledTask
  12. {
  13. /// <summary>
  14. /// Gets the name of the task
  15. /// </summary>
  16. /// <value>The name.</value>
  17. string Name { get; }
  18. string Key { get; }
  19. /// <summary>
  20. /// Gets the description.
  21. /// </summary>
  22. /// <value>The description.</value>
  23. string Description { get; }
  24. /// <summary>
  25. /// Gets the category.
  26. /// </summary>
  27. /// <value>The category.</value>
  28. string Category { get; }
  29. /// <summary>
  30. /// Executes the task
  31. /// </summary>
  32. /// <param name="cancellationToken">The cancellation token.</param>
  33. /// <param name="progress">The progress.</param>
  34. /// <returns>Task.</returns>
  35. Task Execute(CancellationToken cancellationToken, IProgress<double> progress);
  36. /// <summary>
  37. /// Gets the default triggers that define when the task will run.
  38. /// </summary>
  39. /// <returns>The default triggers that define when the task will run.</returns>
  40. IEnumerable<TaskTriggerInfo> GetDefaultTriggers();
  41. }
  42. }