CallerContextServiceQueueBackgroundTaskT Method (FuncT, TimeSpan, CancellationToken)

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 (24.3.0.1000)
Syntax
public Task<T> QueueBackgroundTask<T>(
	Func<T> func,
	TimeSpan delay,
	CancellationToken cancellationToken
)

Parameters

func
Type: SystemFuncT
The delegate to run.
delay
Type: SystemTimeSpan
The delay.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation token.

Type Parameters

T
The type of object returned by the task.

Return Value

Type: 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