/// <summary> /// Schedules the continuation action for /// the <see cref="ConfiguredTaskLikeAwaitable{TResult}" />. /// </summary> /// <param name="continuation"> /// The action to invoke when the operation completes. /// </param> public void OnCompleted(Action continuation) { _value.AsTask() // use the underline task to do the actual job .ConfigureAwait(_continueOnCapturedContext) .GetAwaiter() .OnCompleted(continuation); }
/// <summary>Schedules the continuation action for this TaskLike.</summary> public void OnCompleted(Action continuation) { _value.AsTask().ConfigureAwait(continueOnCapturedContext: true).GetAwaiter().OnCompleted(continuation); }