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