* Update gitignore * Move csproj * Update project references * Update solutions * Update build scripts * Tests used to share editorconfig with projects in src * Fix broken tests. * Stop copying around .editorconfig merged root one with linting * csharp_style_expression_bodied -> suggestion * Move StyleCop rulesets to matching directories and update shared build properties * Remove legacy build files, update NuGet.cofig and solution files * Restore myget source * Clean up .gitignore * Update .gitignore * Move new test classes to tests after merge * Gitignore + nuget config * Move new test Co-authored-by: Ronald Barendse <ronald@barend.se>
31 lines
923 B
C#
31 lines
923 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Umbraco.Web.Scheduling
|
|
{
|
|
/// <summary>
|
|
/// Represents a background task.
|
|
/// </summary>
|
|
public interface IBackgroundTask : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Runs the background task.
|
|
/// </summary>
|
|
void Run();
|
|
|
|
/// <summary>
|
|
/// Runs the task asynchronously.
|
|
/// </summary>
|
|
/// <param name="token">A cancellation token.</param>
|
|
/// <returns>A <see cref="Task"/> instance representing the execution of the background task.</returns>
|
|
/// <exception cref="NotImplementedException">The background task cannot run asynchronously.</exception>
|
|
Task RunAsync(CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Indicates whether the background task can run asynchronously.
|
|
/// </summary>
|
|
bool IsAsync { get; }
|
|
}
|
|
}
|