Struct TplExtensions.NoThrowValueTaskAwaiter<TResult>
- Namespace
- Microsoft.VisualStudio.Threading
- Assembly
- Microsoft.VisualStudio.Threading.dll
An awaiter that wraps a task and never throws an exception when waited on.
public readonly struct TplExtensions.NoThrowValueTaskAwaiter<TResult> : ICriticalNotifyCompletion, INotifyCompletion
Type Parameters
TResult
The type of the result.
- Implements
- Inherited Members
Constructors
NoThrowValueTaskAwaiter(ValueTask<TResult>, bool)
Initializes a new instance of the TplExtensions.NoThrowValueTaskAwaiter<TResult> struct.
public NoThrowValueTaskAwaiter(ValueTask<TResult> task, bool captureContext)
Parameters
Properties
IsCompleted
Gets a value indicating whether the task has completed.
public bool IsCompleted { get; }
Property Value
Methods
GetResult()
Does nothing.
public void GetResult()
OnCompleted(Action)
Schedules a delegate for execution at the conclusion of a task's execution.
public void OnCompleted(Action continuation)
Parameters
continuation
ActionThe action.
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.