using System; using System.Collections.Generic; namespace MediaBrowser.Common.ScheduledTasks { public interface ITaskManager : IDisposable { /// /// Gets the list of Scheduled Tasks /// /// The scheduled tasks. IScheduledTask[] ScheduledTasks { get; } /// /// Cancels if running and queue. /// /// void CancelIfRunningAndQueue() where T : IScheduledTask; /// /// Queues the scheduled task. /// /// void QueueScheduledTask() where T : IScheduledTask; /// /// Queues the scheduled task. /// /// The task. void QueueScheduledTask(IScheduledTask task); /// /// Adds the tasks. /// /// The tasks. void AddTasks(IEnumerable tasks); /// /// Called when [task completed]. /// /// The task. void OnTaskCompleted(IScheduledTask task); } }