TaskUtilities..::..AutoCompletingTask<(Of <(<'T>)>)> Method (T, TimeSpan)

Creates a task that automatically completes after a given delay.

Namespace:  Tortuga.Anchor
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


[SuppressMessageAttribute]
public static Task<T> AutoCompletingTask<T>(
	T result,
	TimeSpan delay
)
<SuppressMessageAttribute> _
Public Shared Function AutoCompletingTask(Of T) ( _
	result As T, _
	delay As TimeSpan _
) As Task(Of T)

Type Parameters

T
Task type

Parameters

result
Type: T
The result to be given to the task.
delay
Type: TimeSpan
The delay before the task is completed.

Return Value

Task that will be completed.

Exceptions


ExceptionCondition
[ArgumentOutOfRangeException]delay