Struct AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter<T>
- Namespace
- Microsoft.VisualStudio.Threading
- Assembly
- Microsoft.VisualStudio.Threading.dll
A Task awaiter that has affinity to executing callbacks synchronously on the completing callstack.
public readonly struct AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter<T> : INotifyCompletion
Type Parameters
T
The type of value returned by the awaited Task.
- Implements
- Inherited Members
Constructors
ExecuteContinuationSynchronouslyAwaiter(Task<T>)
Initializes a new instance of the AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter<T> struct.
public ExecuteContinuationSynchronouslyAwaiter(Task<T> antecedent)
Parameters
antecedent
Task<T>The task whose completion will execute the continuation.
Properties
IsCompleted
Gets a value indicating whether the antedent Task has already completed.
public bool IsCompleted { get; }
Property Value
Methods
GetResult()
Rethrows any exception thrown by the antecedent.
public T GetResult()
Returns
- T
OnCompleted(Action)
Schedules a callback to run when the antecedent task completes.
public void OnCompleted(Action continuation)
Parameters
continuation
ActionThe callback to invoke.