Share via


IVsOperationProgress2.RegisterStageOperationTasksAsync Method

Definition

Registers tasks to the operation progress using a taskRegistrationActionAsync. When all registered tasks and the task registration action are completed, the access to the stage is considered completed.

public:
 System::Threading::Tasks::Task ^ RegisterStageOperationTasksAsync(System::String ^ operationProgressStageId, System::String ^ name, System::UInt32 estimatedTaskCount, Func<Microsoft::VisualStudio::OperationProgress::IOperationProgressStageAccess ^, System::Threading::Tasks::Task ^> ^ taskRegistrationActionAsync);
public System.Threading.Tasks.Task RegisterStageOperationTasksAsync (string operationProgressStageId, string name, uint estimatedTaskCount, Func<Microsoft.VisualStudio.OperationProgress.IOperationProgressStageAccess,System.Threading.Tasks.Task> taskRegistrationActionAsync);
abstract member RegisterStageOperationTasksAsync : string * string * uint32 * Func<Microsoft.VisualStudio.OperationProgress.IOperationProgressStageAccess, System.Threading.Tasks.Task> -> System.Threading.Tasks.Task
Public Function RegisterStageOperationTasksAsync (operationProgressStageId As String, name As String, estimatedTaskCount As UInteger, taskRegistrationActionAsync As Func(Of IOperationProgressStageAccess, Task)) As Task

Parameters

operationProgressStageId
String

The identifier of the stage to access. See CommonOperationProgressStageIds for common stages.

name
String

Invariant name of this access used to log telemetry.

estimatedTaskCount
UInt32

An initial estimate of the number of OperationProgressTask that will be registered for this access. Used to estimate progress of this access.

taskRegistrationActionAsync
Func<IOperationProgressStageAccess,Task>

Action that registers work to the stage access. Its duration in combination with the duration of the registered tasks control the duration of the stage.

Returns

A Task that completes when the taskRegistrationActionAsync completes.

Applies to