예제 #1
0
 /// <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);
 }
예제 #2
0
 /// <summary>Schedules the continuation action for this TaskLike.</summary>
 public void OnCompleted(Action continuation)
 {
     _value.AsTask().ConfigureAwait(continueOnCapturedContext: true).GetAwaiter().OnCompleted(continuation);
 }