using System;
namespace Umbraco.Web.Scheduling
{
///
/// Provides arguments for task runner events.
///
/// The type of the task.
public class TaskEventArgs : EventArgs
where T : IBackgroundTask
{
///
/// Initializes a new instance of the class with a task.
///
/// The task.
public TaskEventArgs(T task)
{
Task = task;
}
///
/// Initializes a new instance of the class with a task and an exception.
///
/// The task.
/// An exception.
public TaskEventArgs(T task, Exception exception)
{
Task = task;
Exception = exception;
}
///
/// Gets or sets the task.
///
public T Task { get; private set; }
///
/// Gets or sets the exception.
///
public Exception Exception { get; private set; }
}
}