IVsTask Interface

 

Provides methods that interact with a task, such as starting it, cancelling it, or appending continuations.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)

[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
[GuidAttribute("0B98EAB8-00BB-45D0-AE2F-3DE35CD68235")]
public interface IVsTask

NameDescription
System_CAPS_pubpropertyAsyncState

Gets the asynchronous state object that was given when the task was created.

System_CAPS_pubpropertyDescription

Gets or sets the description for the text that is displayed for component diagnostics.

System_CAPS_pubpropertyIsCanceled

Gets whether the task group is cancelled. If true, the task group is cancelled.

System_CAPS_pubpropertyIsCompleted

Gets whether the task result is available. If true, the task result is available. If false, a GetResult call is blocked until the task is completed.

System_CAPS_pubpropertyIsFaulted

Gets whether the task completed with an exception. If true, an exception occurred.

NameDescription
System_CAPS_pubmethodAbortIfCanceled()

Aborts the task if the task has been cancelled. Use this method to return from a cancelled task.

System_CAPS_pubmethodCancel()

Cancels the task group. An antecedent task and all of its children share the same cancellation token, so cancelling any of the tasks cancels the whole task group.

System_CAPS_pubmethodContinueWith(UInt32, IVsTaskBody)

Appends the provided action to this task to be run after the task is run to completion. The action is invoked on the context provided.

System_CAPS_pubmethodContinueWithEx(UInt32, UInt32, IVsTaskBody, Object)

Appends the provided action (using the specified options) to this task to be run after the task is run to completion. The action is invoked on the context provided.

System_CAPS_pubmethodGetResult()

Waits for the task to complete (not including any continuations) and returns the result set by the task. If the task returns an error code or an exception, this method returns the same error code.

System_CAPS_pubmethodStart()

Starts the task.

System_CAPS_pubmethodWait()

Waits for the task to complete (not including any continuations). If the task returns an error code or an exception, this method returns the same error code.

System_CAPS_pubmethodWaitEx(Int32, UInt32)

Waits for the task to complete (not including any continuations). You can either specify a timeout (or INFINITE) or set the option to abort on task cancellation.

Return to top
Show: