Saxonite 1.2.11.2
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Sarand.Net.Standard.Base.Tasks
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public SacsTaskData (CancellationToken? cancellationToken)
|
||||
public SacsTaskData (CancellationToken? cancellationToken = null)
|
||||
{
|
||||
if (cancellationToken != null)
|
||||
{
|
||||
@@ -49,18 +49,22 @@ namespace Sarand.Net.Standard.Base.Tasks
|
||||
// Properties.
|
||||
public bool Debug { get; set; }
|
||||
|
||||
/// <summary>Token to allow the async request to be cancelled.</summary>
|
||||
public CancellationToken CancellationToken { get; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// C a n c e l l a t i o n
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Token to allow the async request to be cancelled.</summary>
|
||||
public CancellationToken CancellationToken { get; }
|
||||
|
||||
/// <summary>Gets whether cancellation has been requested.</summary>
|
||||
public bool IsCancellationRequested { get { return CancellationToken.IsCancellationRequested; } }
|
||||
|
||||
/// <summary>Throws a System.OperationCanceledException if this token has had cancellation requested.</summary>
|
||||
public void ThrowIfCancellationRequested()
|
||||
{
|
||||
CancellationToken.ThrowIfCancellationRequested();
|
||||
}
|
||||
|
||||
/// <summary>Can cancellation be triggered here?</summary>
|
||||
public bool CanBeCancelled { get { return cancellationTokenSource != null; } }
|
||||
public bool TriggerCancellation ()
|
||||
|
||||
Reference in New Issue
Block a user