英語で読む

次の方法で共有


VsTaskBodyCallback Delegate

Definition

Used by the asynchronous task library helper as the method type for a task body (what the task executes). Users of the library can either pass in this delegate type directly or use one of the wrapper methods that wraps simpler anonymous functions to this delegate type.

C++/CX
public delegate Platform::Object ^ VsTaskBodyCallback(IVsTask ^ task, Platform::Array <IVsTask ^> ^ parentTasks);

Parameters

task
IVsTask

The task that is executing, that is, the asynchronous task to which the task body belongs. This can be used to check if task cancellation was requested.

parentTasks
IVsTask[]

An array that contains the dependent tasks that had to be completed before your task. Normally this is either empty if the task was a new task, or it contains a single task if the task was a continuation of another task.

Return Value

Returns Object.

Applies to

製品 バージョン
Visual Studio SDK 2015, 2017, 2019, 2022