Continuation
Represents various continuations.
public static Task<T> ContinueWithTimeout<T>(this Task<T> task, TimeSpan timeout, CancellationToken token = default)
Attaches timeout and, optionally, token to the task.
public static Task<T> OnCanceled<T, TConstant>(this Task<T> task, TaskScheduler scheduler = null) where TConstant : Constant<T>
Returns constant value if underlying task is canceled.
Allows to obtain original Task in its final state after await without
throwing exception produced by this task.
Allows to obtain original Task<T> in its final state after await without
throwing exception produced by this task.
public static Task<T> OnFaulted<T, TConstant>(this Task<T> task, TaskScheduler scheduler = null) where TConstant : Constant<T>
Returns constant value if underlying task is failed.
public static Task<T> OnFaulted<T, TConstant>(this Task<T> task, Predicate<AggregateException> filter, TaskScheduler scheduler = null) where TConstant : Constant<T>
Returns constant value if underlying task is failed with the exception that matches
to the filter.
public static Task<T> OnFaultedOrCanceled<T, TConstant>(this Task<T> task, TaskScheduler scheduler = null) where TConstant : Constant<T>
Returns constant value if underlying task is failed or canceled.
public static Task<T> OnFaultedOrCanceled<T, TConstant>(this Task<T> task, Predicate<AggregateException> filter, TaskScheduler scheduler = null) where TConstant : Constant<T>
Returns constant value if underlying task is canceled or failed with the exception that matches
to the filter.