CallerContextServiceQueueBackgroundTaskT(FuncT, TimeSpan, CancellationToken) Method

Runs an action after a specified delay.

Namespace: Dundas.BI.Services
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (26.2.0.1000)
Syntax
public Task<T> QueueBackgroundTask<T>(
	Func<T> func,
	TimeSpan delay,
	CancellationToken cancellationToken
)

Parameters

func  FuncT
The delegate to run.
delay  TimeSpan
The delay.
cancellationToken  CancellationToken
The cancellation token.

Type Parameters

T
The type of object returned by the task.

Return Value

TaskT
A task object representing the asynchronous operation.

Implements

ICallerContextServiceQueueBackgroundTaskT(FuncT, TimeSpan, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullExceptionfunc is .
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