/// <summary>
 /// Invokes the given action with the set result of the task when the task succeeded.
 /// </summary>
 /// <param name="action">The action to perform.</param>
 /// <returns>This task.</returns>
 public static Task <T> OnResult <T>(this Task <T> task, Action <T> action)
 {
     return(task.OnResult <T>(action, null));
 }
 /// <summary>
 /// Invokes the given action with the set result of the task when the task succeeded.
 /// </summary>
 /// <param name="action">The action to perform.</param>
 /// <returns>This task.</returns>
 public static Task OnResult(this Task task, Action <object> action)
 {
     return(task.OnResult(action, null));
 }