Click or drag to resize

AsyncHelperNullGuard Method (Task)

Insures that an awaited method always returns a Task.

Namespace:  Cauldron
Assembly:  Cauldron.Win32.WPF (in Cauldron.Win32.WPF.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Task NullGuard(
	Task task
)

Parameters

task
Type: System.Threading.TasksTask
The awaitable task

Return Value

Type: Task
An awaitable task
Examples
await AsyncHelper.NullGuard(instance.GetStuff()?.RemoveAllAsync());
See Also