* 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>
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System;
|
|
|
|
namespace Umbraco.Web.Scheduling
|
|
{
|
|
/// <summary>
|
|
/// Provides arguments for task runner events.
|
|
/// </summary>
|
|
/// <typeparam name="T">The type of the task.</typeparam>
|
|
public class TaskEventArgs<T> : EventArgs
|
|
where T : IBackgroundTask
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="TaskEventArgs{T}"/> class with a task.
|
|
/// </summary>
|
|
/// <param name="task">The task.</param>
|
|
public TaskEventArgs(T task)
|
|
{
|
|
Task = task;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="TaskEventArgs{T}"/> class with a task and an exception.
|
|
/// </summary>
|
|
/// <param name="task">The task.</param>
|
|
/// <param name="exception">An exception.</param>
|
|
public TaskEventArgs(T task, Exception exception)
|
|
{
|
|
Task = task;
|
|
Exception = exception;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the task.
|
|
/// </summary>
|
|
public T Task { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the exception.
|
|
/// </summary>
|
|
public Exception Exception { get; private set; }
|
|
}
|
|
}
|