AsyncHelperFromCompleted(TaskConfig) Method

Returns a task that represents an already completed operation without a result.
See the Examples section of the AsyncHelper class for details. The example uses the similarly working FromResult method.

Definition

Namespace: KGySoft.Threading
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.2.0
C#
public static Task FromCompleted(
	TaskConfig? asyncConfig
)

Parameters

asyncConfig  TaskConfig
The configuration for the asynchronous operation.

Return Value

Task
A Task that represents the completed operation.

Exceptions

TaskCanceledExceptionThe operation has been canceled and ThrowIfCanceled in asyncConfig was . This exception is thrown when the result is awaited.

See Also