Struct TplExtensions.NoThrowValueTaskAwaitable<TResult>
- Namespace
- Microsoft.VisualStudio.Threading
- Assembly
- Microsoft.VisualStudio.Threading.dll
An awaitable that wraps a ValueTask<TResult> and never throws an exception when waited on.
public readonly struct TplExtensions.NoThrowValueTaskAwaitable<TResult>
Type Parameters
TResult
The type of the result.
- Inherited Members
Constructors
NoThrowValueTaskAwaitable(ValueTask<TResult>, bool)
Initializes a new instance of the TplExtensions.NoThrowValueTaskAwaitable<TResult> struct.
public NoThrowValueTaskAwaitable(ValueTask<TResult> task, bool captureContext)
Parameters
task
ValueTask<TResult>The task.
captureContext
boolWhether the continuation should be scheduled on the current sync context.
Methods
GetAwaiter()
Gets the awaiter.
public TplExtensions.NoThrowValueTaskAwaiter<TResult> GetAwaiter()
Returns
- TplExtensions.NoThrowValueTaskAwaiter<TResult>
The awaiter.