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

Creates a task that automatically completes after a given delay.

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

Syntax


public static Task<T> AutoCompletingTask<T>(
	T result,
	int delay
)
Public Shared Function AutoCompletingTask(Of T) ( _
	result As T, _
	delay As Integer _
) As Task(Of T)

Type Parameters

T
Task type

Parameters

result
Type: T
The result to be given to the task.
delay
Type: Int32
The delay, in milliseconds, before the task is completed.

Return Value

Task that will be completed.

Remarks


Use Task.Delay if a result isn't needed.