VsTaskLibraryHelper Class
Supplies helper methods for using the Visual Studio task library in managed code.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Shell.VsTaskLibraryHelper
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaración
<ExtensionAttribute> _
Public NotInheritable Class VsTaskLibraryHelper
public static class VsTaskLibraryHelper
The VsTaskLibraryHelper type exposes the following members.
Methods
Name | Description | |
---|---|---|
CompleteAfterTask<T> | ||
ContinueWhenAllCompleted(IVsTaskSchedulerService, VsTaskRunContext, array<IVsTask[], IVsTaskBody) | Creates a Visual Studio task that is run after all the provided tasks have either finished running or have been cancelled. Overrides ContinueWhenAllCompleted. | |
ContinueWhenAllCompleted(IVsTaskSchedulerService, VsTaskRunContext, array<IVsTask[], VsTaskContinuationOptions, IVsTaskBody, Object) | Creates a task (using the specified options) that is run after all the given tasks are completed. Overrides ContinueWhenAllCompletedEx. | |
ContinueWith(IVsTask, VsTaskRunContext, 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. Overrides ContinueWith. | |
ContinueWith(IVsTask, VsTaskRunContext, VsTaskContinuationOptions, 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. Overrides ContinueWithEx. | |
CreateAndStartTask | Creates a Visual Studio task that is executed with the specified context. | |
CreateAndStartTaskEx | Creates a Visual Studio task that is executed with the specified context. | |
CreateTask(IVsTaskSchedulerService, VsTaskRunContext, IVsTaskBody) | Creates a task that is run on the given context. | |
CreateTask(IVsTaskSchedulerService, VsTaskRunContext, VsTaskCreationOptions, IVsTaskBody, Object) | Creates a task with the specified options that is run on the given context. | |
CreateTaskBody(Action) | Creates a task body that can be consumed by the task scheduler service. | |
CreateTaskBody(Object}) | ||
CreateTaskBody(VsTaskBodyCallback) | Creates a task body that can be consumed by the task scheduler service. | |
CreateTaskBody<T>(Action<T>) | Creates a task body that can be consumed by the task scheduler service. | |
CreateTaskBody<T>(Object}) | ||
CreateTaskCompletionSource | Creates a task completion source instance with the specified options. | |
Delay(IVsTaskSchedulerService, Double) | Retrieves a task that delays execution of the subsequent task by a given period of time. | |
Delay(IVsTaskSchedulerService, TimeSpan) | Returns a task that delays execution of the subsequent task by a given period of time. | |
GetAwaiter(IVsTask) | Gets the task to be used for scheduling continuations. | |
GetAwaiter(VsTaskAwaiter) | Gets the awaiter instance that contains the task that will be used to schedule continuations. Adds await support for an awaiter instance that can be returned from a call to ResumeWith. | |
InvokeAsync<T> | transforms a task parallel library (TPL) task from an asynchronous function into an IVsTask. | |
ResumeWith | Extension method for task awatier to support awaits with a specific context. | |
Wait(IVsTask, Int32) | Waits for the task to complete (not including any continuations). Override for WaitEx with default options. | |
Wait(IVsTask, Int32, VsTaskWaitOptions) | Waits for the task to complete (not including any continuations). Override for WaitEx to use proper enumeration types. | |
Yield | Yields the current operation on the thread. The rest of the asynchronous method will be scheduled as a continuation. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.