VsTaskLibraryHelper Class
Supplies helper methods for using the Visual Studio task library in managed code.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.Shell.VsTaskLibraryHelper
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public NotInheritable Class VsTaskLibraryHelper
public static class VsTaskLibraryHelper
[ExtensionAttribute]
public ref class VsTaskLibraryHelper abstract sealed
[<AbstractClass>]
[<Sealed>]
type VsTaskLibraryHelper = class end
public final class VsTaskLibraryHelper
The VsTaskLibraryHelper type exposes the following members.
Properties
Name | Description | |
---|---|---|
ServiceInstance | Gets the singleton service instance. |
Top
Methods
Name | Description | |
---|---|---|
ApplyCancellationToken | Signals a Visual Studio task to cancel operations as soon as possible when the specified token is canceled. | |
AsVsTask<T> | Wraps a JoinableTask<T> instance in an IVsTask that can be returned to COM clients. | |
CompleteAfterTask<T> | ||
ContinueWhenAllCompleted(IVsTaskSchedulerService, VsTaskRunContext, array<IVsTask[], IVsTaskBody) | Creates a Visual Studio task that's run after the provided tasks have either finished running or been cancelled. Overrides ContinueWhenAllCompleted. | |
ContinueWhenAllCompleted(IVsTaskSchedulerService, VsTaskRunContext, array<IVsTask[], VsTaskContinuationOptions, IVsTaskBody, Object) | Uses the specified options to create a task that's run after the given tasks are completed. Overrides ContinueWhenAllCompletedEx. | |
ContinueWith(IVsTask, VsTaskRunContext, IVsTaskBody) | Appends to this task the provided action, to be run after the task is run to completion. The action is invoked on the provided context. Overrides ContinueWith. | |
ContinueWith(IVsTask, VsTaskRunContext, VsTaskContinuationOptions, IVsTaskBody, Object) | Uses the specified options to append to this task the provided action, to be run after the task is run to completion. The action is invoked on the provided context. Overrides ContinueWithEx. | |
CreateAndStartTask(IVsTaskSchedulerService, VsTaskRunContext, IVsTaskBody) | Creates a Visual Studio task that's executed with the specified context. | |
CreateAndStartTask(IVsTaskSchedulerService, VsTaskRunContext, VsTaskBodyCallback) | Creates a Visual Studio task that will be executed in the specified context. | |
CreateAndStartTask(IVsTaskSchedulerService, VsTaskRunContext, Action) | Creates a Visual Studio task that will be executed in the specified context. | |
CreateAndStartTaskEx | Creates a Visual Studio task that's executed with the specified context. | |
CreateTask(IVsTaskSchedulerService, VsTaskRunContext, IVsTaskBody) | Creates a task that's 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(Func<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>(Func<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(VsTaskAwaiter) | Internal use only. 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. | |
GetAwaiter(IVsTask) | Internal use only. Gets the task to be used for scheduling continuations. | |
InvokeAsync<T> | Transforms a task parallel library (TPL) task from an asynchronous function into an IVsTask. | |
IsUIThreadContext | Determines whether the specified context represents UI thread work. | |
ResumeWith | Extension method for task awaiter to support awaits with a specific context. | |
RunAsync(JoinableTaskFactory, VsTaskRunContext, Func<Task>) | ||
RunAsync<T>(JoinableTaskFactory, VsTaskRunContext, Func<Task<T>>) | ||
RunAsyncAsVsTask<T> | ||
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 correct enumeration types. | |
Yield(VsTaskRunContext, IVsTaskCompletionSource) | Yields the current operation on the thread, so that the rest of the async method is scheduled as a continuation. | |
Yield(IVsTaskSchedulerService, VsTaskRunContext, IVsTaskCompletionSource) | 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.