Open this page in the API Guide

ICallerContextService.QueueBackgroundTask Method (Action, TimeSpan, CancellationToken)

Runs an action after a specified delay.

Namespace:  Dundas.BI
Assembly:  Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (25.1.0.1000)
Syntax
Task QueueBackgroundTask(
	Action action,
	TimeSpan delay,
	CancellationToken cancellationToken
)

Parameters

action
Type: System.Action
The action to run.
delay
Type: System.TimeSpan
The delay.
cancellationToken
Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task
A task object representing the asynchronous operation.
Exceptions
ExceptionCondition
ArgumentNullExceptionaction is null.
ArgumentOutOfRangeException

delay represents a negative time interval.

-or-

The delay argument's TotalMilliseconds property is greater than MaxValue.

ObjectDisposedExceptionThe provided cancellationToken has already been disposed.
See Also