public static Task <TResult> ContinueWithErrorHandling <TResult, TInput>(this Task <TInput> task, Func <Task <TInput>, TResult> continuationFunction, ITaskErrorLogger logger) { if (task.IsFaulted) { logger.LogTaskError(task); } return(task.ContinueWith(continuationFunction)); }
public static Task ContinueWithErrorHandling <T>(this Task <T> task, Action <Task <T> > continuationAction, ITaskErrorLogger logger) { if (task.IsFaulted) { logger.LogTaskError(task); } return(task.ContinueWith(continuationAction)); }