示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncAwaitable"/> struct.
 /// </summary>
 public AsyncAwaitable(IAsyncOperation op, SynchronizationContext syncContext)
 {
     _awaiter = new AsyncAwaiter(op, syncContext);
 }
示例#2
0
 /// <inheritdoc/>
 public void OnCompleted(Action continuation)
 {
     AsyncAwaiter.SetAwaitContinuation(_op, continuation, _syncContext);
 }
示例#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);
 }