/// <summary>
 /// Initializes a new instance of the <see cref="AsyncAwaitable"/> struct.
 /// </summary>
 public AsyncAwaitable(IAsyncOperation op, SynchronizationContext syncContext)
 {
     _awaiter = new AsyncAwaiter(op, syncContext);
 }
Exemple #2
0
 /// <inheritdoc/>
 public void OnCompleted(Action continuation)
 {
     AsyncAwaiter.SetAwaitContinuation(_op, continuation, _syncContext);
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncAwaitable{TResult}"/> struct.
 /// </summary>
 public AsyncAwaitable(IAsyncOperation <TResult> op, SynchronizationContext syncContext)
 {
     _awaiter = new AsyncAwaiter <TResult>(op, syncContext);
 }