Struct AwaitExtensions.ConfiguredTaskYieldAwaiter
- Namespace
- Microsoft.VisualStudio.Threading
- Assembly
- Microsoft.VisualStudio.Threading.dll
An awaiter that will always lead the calling async method to yield, then immediately resume, possibly on the original SynchronizationContext.
public readonly struct AwaitExtensions.ConfiguredTaskYieldAwaiter : ICriticalNotifyCompletion, INotifyCompletion
- Implements
- Inherited Members
Constructors
ConfiguredTaskYieldAwaiter(bool)
Initializes a new instance of the AwaitExtensions.ConfiguredTaskYieldAwaiter struct.
public ConfiguredTaskYieldAwaiter(bool continueOnCapturedContext)
Parameters
continueOnCapturedContext
boolA value indicating whether the continuation should run on the captured SynchronizationContext, if any.
Properties
IsCompleted
Gets a value indicating whether the caller should yield.
public bool IsCompleted { get; }
Property Value
- bool
Always false.
Methods
GetResult()
Does nothing.
public void GetResult()
OnCompleted(Action)
Schedules a continuation to execute immediately (but not synchronously).
public void OnCompleted(Action continuation)
Parameters
continuation
ActionThe delegate to invoke.
UnsafeOnCompleted(Action)
Schedules a delegate for execution at the conclusion of a task's execution without capturing the ExecutionContext.
public void UnsafeOnCompleted(Action continuation)
Parameters
continuation
ActionThe action.