<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.0" />

ValueTaskSourceOnCompletedFlags

Flags passed from ValueTask and ValueTask<T> to OnCompleted and OnCompleted to control behavior.

Set if OnCompleted should capture the current ExecutionContext and use it to run the continuation.

None = 0

No requirements are placed on how the continuation is invoked.

Set if OnCompleted should capture the current scheduling context (e.g. SynchronizationContext) and use it when queueing the continuation for execution. If this is not set, the implementation may choose to execute the continuation in an arbitrary location.