<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.0.0-pre-04" />

Nito.AsyncEx.Synchronous.TaskExtensions

public static class TaskExtensions
Provides synchronous extension methods for tasks.
public static void WaitAndUnwrapException(this Task task)

Waits for the task to complete, unwrapping any exceptions.

public static void WaitAndUnwrapException(this Task task, CancellationToken cancellationToken)

Waits for the task to complete, unwrapping any exceptions.

public static TResult WaitAndUnwrapException<TResult>(this Task<TResult> task)

Waits for the task to complete, unwrapping any exceptions.

public static TResult WaitAndUnwrapException<TResult>(this Task<TResult> task, CancellationToken cancellationToken)

Waits for the task to complete, unwrapping any exceptions.

public static void WaitWithoutException(this Task task)

Waits for the task to complete, but does not raise task exceptions. The task exception (if any) is unobserved.

public static void WaitWithoutException(this Task task, CancellationToken cancellationToken)

Waits for the task to complete, but does not raise task exceptions. The task exception (if any) is unobserved.