mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
40 lines
No EOL
1.1 KiB
C#
40 lines
No EOL
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace MediaBrowser.Common.ScheduledTasks
|
|
{
|
|
public interface ITaskManager : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Gets the list of Scheduled Tasks
|
|
/// </summary>
|
|
/// <value>The scheduled tasks.</value>
|
|
IScheduledTaskWorker[] ScheduledTasks { get; }
|
|
|
|
/// <summary>
|
|
/// Cancels if running and queue.
|
|
/// </summary>
|
|
/// <typeparam name="T"></typeparam>
|
|
void CancelIfRunningAndQueue<T>()
|
|
where T : IScheduledTask;
|
|
|
|
/// <summary>
|
|
/// Queues the scheduled task.
|
|
/// </summary>
|
|
/// <typeparam name="T"></typeparam>
|
|
void QueueScheduledTask<T>()
|
|
where T : IScheduledTask;
|
|
|
|
/// <summary>
|
|
/// Queues the scheduled task.
|
|
/// </summary>
|
|
/// <param name="task">The task.</param>
|
|
void QueueScheduledTask(IScheduledTask task);
|
|
|
|
/// <summary>
|
|
/// Adds the tasks.
|
|
/// </summary>
|
|
/// <param name="tasks">The tasks.</param>
|
|
void AddTasks(IEnumerable<IScheduledTask> tasks);
|
|
}
|
|
} |