TplExtensions.NoThrowTaskAwaitable Constructor
Initializes a new instance of NoThrowTaskAwaitable.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Sub New ( _
task As Task, _
captureContext As Boolean _
)
public NoThrowTaskAwaitable(
Task task,
bool captureContext
)
public:
NoThrowTaskAwaitable(
Task^ task,
bool captureContext
)
new :
task:Task *
captureContext:bool -> NoThrowTaskAwaitable
public function TplExtensions.NoThrowTaskAwaitable(
task : Task,
captureContext : boolean
)
Parameters
task
Type: System.Threading.Tasks.TaskThe task.
captureContext
Type: System.Booleantrue if the continuation should be scheduled on the current sync context, otherwise false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.