Table of Contents

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

task Task

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.