Compartir a través de


IVsTask2 Interface

Definition

Extends IVsTask to add support for task-specific messages that are shown in the Threaded Wait Dialog when the UI thread is blocked on a task. If a WaitMessage isn't specified, then a generic message (Waiting for a required operation to complete...) is used.

public interface class IVsTask2 : Microsoft::VisualStudio::Shell::Interop::IVsTask
public interface class IVsTask2 : Microsoft::VisualStudio::Shell::Interop::IVsTask
__interface IVsTask2 : Microsoft::VisualStudio::Shell::Interop::IVsTask
[System.Runtime.InteropServices.Guid("26F21ACD-A055-4F5B-97BE-27C2EC4D7A33")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsTask2 : Microsoft.VisualStudio.Shell.Interop.IVsTask
[<System.Runtime.InteropServices.Guid("26F21ACD-A055-4F5B-97BE-27C2EC4D7A33")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsTask2 = interface
    interface IVsTask
Public Interface IVsTask2
Implements IVsTask
Attributes
Implements

Properties

AsyncState
Description
IsCanceled
IsCompleted
IsFaulted
WaitMessage

Gets or sets the message that is displayed in the Threaded Wait Dialog when the UI thread calls GetResult or Wait and the task isn't complete. If no WaitMessage is supplied (either null or whitespace) a generic message will be used.

Methods

AbortIfCanceled()
Cancel()
ContinueWith(UInt32, IVsTaskBody)
ContinueWithEx(UInt32, UInt32, IVsTaskBody, Object)
GetResult()
Start()
Wait()
WaitEx(Int32, UInt32)

Extension Methods

ApplyCancellationToken(IVsTask, CancellationToken)

Signals a VS Task to abort operations as soon as possible when the specified token is canceled.

CancelOnShutdown(IVsTask, AsyncPackage)

Ensures that task will be canceled when package is disposed. The package's Dispose method will not return until task completes.

CancelWhenCancellationRequested(IVsTask, JoinableTaskFactory, CancellationToken)

Ensures that task will be canceled when cancellation is requested for cancellationToken.

ContinueWith(IVsTask, VsTaskRunContext, IVsTaskBody)

Override for IVsTask.ContinueWith to use proper enum types.

ContinueWith(IVsTask, VsTaskRunContext, VsTaskContinuationOptions, IVsTaskBody, Object)

Override for IVsTask.ContinueWithEx to use proper enum types.

GetAwaiter(IVsTask)

Extension method for IVsTask to support await syntax in managed code.

ResumeWith(IVsTask, VsTaskRunContext)

Extension method for task awatier to support awaits with a specific context.

Wait(IVsTask, Int32, VsTaskWaitOptions)

Override for IvsTask.WaitEx to use proper enum types.

Wait(IVsTask, Int32)

Override for IvsTask.WaitEx with default options.

Applies to