Table of Contents

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

task ValueTask<TResult>

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.