namespace Umbraco.Web.Scheduling
{
///
/// Provides options to the class.
///
internal class BackgroundTaskRunnerOptions
{
//TODO: Could add options for using a stack vs queue if required
///
/// Initializes a new instance of the class.
///
public BackgroundTaskRunnerOptions()
{
LongRunning = false;
KeepAlive = false;
AutoStart = false;
}
///
/// Gets or sets a value indicating whether the running task should be a long-running,
/// coarse grained operation.
///
public bool LongRunning { get; set; }
///
/// Gets or sets a value indicating whether the running task should block and wait
/// on the queue, or end, when the queue is empty.
///
public bool KeepAlive { get; set; }
///
/// Gets or sets a value indicating whether the running task should start immediately
/// or only once a task has been added to the queue.
///
public bool AutoStart { get; set; }
///
/// Gets or setes a value indicating whether the running task should be preserved
/// once completed, or reset to null. For unit tests.
///
public bool PreserveRunningTask { get; set; }
}
}