using System; using System.Threading; using System.Threading.Tasks; namespace Umbraco.Web.Scheduling { /// /// Represents a background task. /// public interface IBackgroundTask : IDisposable { /// /// Runs the background task. /// void Run(); /// /// Runs the task asynchronously. /// /// A cancellation token. /// A instance representing the execution of the background task. /// The background task cannot run asynchronously. Task RunAsync(CancellationToken token); /// /// Indicates whether the background task can run asynchronously. /// bool IsAsync { get; } } }