Table of Contents

Struct TplExtensions.NoThrowValueTaskAwaiter

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 : ICriticalNotifyCompletion, INotifyCompletion
Implements
Inherited Members

Constructors

NoThrowValueTaskAwaiter(ValueTask, bool)

Initializes a new instance of the TplExtensions.NoThrowValueTaskAwaiter struct.

public NoThrowValueTaskAwaiter(ValueTask task, bool captureContext)

Parameters

task ValueTask

The task.

captureContext bool

if set to true [capture context].

Properties

IsCompleted

Gets a value indicating whether the task has completed.

public bool IsCompleted { get; }

Property Value

bool

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 Action

The 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 Action

The action.