Struct TplExtensions.NoThrowTaskAwaiter
- 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.NoThrowTaskAwaiter : ICriticalNotifyCompletion, INotifyCompletion
- Implements
- Inherited Members
Constructors
NoThrowTaskAwaiter(Task, bool)
Initializes a new instance of the TplExtensions.NoThrowTaskAwaiter struct.
public NoThrowTaskAwaiter(Task 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.