Compartilhar via


ThreadedWaitDialogHelper.StartWaitDialog Method

Definition

Show the threaded wait dialog and wire it up to receive progress updates via IProgress<T> and report cancellation via CancellationToken.

public static Microsoft.VisualStudio.Shell.ThreadedWaitDialogHelper.Session StartWaitDialog (this Microsoft.VisualStudio.Shell.Interop.IVsThreadedWaitDialogFactory dialogFactory, string waitCaption, Microsoft.VisualStudio.Shell.ThreadedWaitDialogProgressData initialProgress = default, TimeSpan delayToShowDialog = default);
static member StartWaitDialog : Microsoft.VisualStudio.Shell.Interop.IVsThreadedWaitDialogFactory * string * Microsoft.VisualStudio.Shell.ThreadedWaitDialogProgressData * TimeSpan -> Microsoft.VisualStudio.Shell.ThreadedWaitDialogHelper.Session
<Extension()>
Public Function StartWaitDialog (dialogFactory As IVsThreadedWaitDialogFactory, waitCaption As String, Optional initialProgress As ThreadedWaitDialogProgressData = Nothing, Optional delayToShowDialog As TimeSpan = Nothing) As ThreadedWaitDialogHelper.Session

Parameters

dialogFactory
IVsThreadedWaitDialogFactory

The dialog factory to use for showing the wait dialog.

waitCaption
String

The caption for the dialog.

initialProgress
ThreadedWaitDialogProgressData

The initial progress data for the dialog.

delayToShowDialog
TimeSpan

The delay before the dialog becomes visible. Resolution is limited to seconds.

Returns

A ThreadedWaitDialogHelper.Session instance that can be used to report progress to the dialog and check for user cancellation of the operation. Call Dispose() on the returned value to dismiss the dialog.

Applies to