Share via


IVsTaskProgressCollection.AddTaskAsync Method

Definition

Creates a task and adds it to the collection's Tasks collection.

public:
 System::Threading::Tasks::Task<Microsoft::VisualStudio::TaskStatusCenter::IVsTaskProgress ^> ^ AddTaskAsync(Microsoft::VisualStudio::TaskStatusCenter::TaskProgressOptions ^ options, Microsoft::VisualStudio::TaskStatusCenter::TaskProgressData progressData, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<Microsoft.VisualStudio.TaskStatusCenter.IVsTaskProgress> AddTaskAsync (Microsoft.VisualStudio.TaskStatusCenter.TaskProgressOptions options, Microsoft.VisualStudio.TaskStatusCenter.TaskProgressData progressData, System.Threading.CancellationToken cancellationToken);
abstract member AddTaskAsync : Microsoft.VisualStudio.TaskStatusCenter.TaskProgressOptions * Microsoft.VisualStudio.TaskStatusCenter.TaskProgressData * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.TaskStatusCenter.IVsTaskProgress>
Public Function AddTaskAsync (options As TaskProgressOptions, progressData As TaskProgressData, cancellationToken As CancellationToken) As Task(Of IVsTaskProgress)

Parameters

options
TaskProgressOptions

A TaskProgressOptions dictating the immutable states, behaviours, and action of the new task.

progressData
TaskProgressData

The initial progress data for the new task.

cancellationToken
CancellationToken

A cancellation token.

Returns

The task that was added to the collection.

Applies to