<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.2" />

ManualResetValueTaskSourceCore<TResult>

public struct ManualResetValueTaskSourceCore<TResult>
Provides the core logic for implementing a manual-reset IValueTaskSource or IValueTaskSource<T>.
public bool RunContinuationsAsynchronously { get; set; }

Gets or sets whether to force continuations to run asynchronously.

public short Version { get; }

Gets the operation version.

public TResult GetResult(short token)

Gets the result of the operation.

public ValueTaskSourceStatus GetStatus(short token)

Gets the status of the operation.

public void OnCompleted(Action<object> continuation, object state, short token, ValueTaskSourceOnCompletedFlags flags)

Schedules the continuation action for this operation.

public void Reset()

Resets to prepare for the next operation.

public void SetException(Exception error)

Complets with an error.

public void SetResult(TResult result)

Completes with a successful result.