VsTaskLibraryHelper.ContinueWith Method (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.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ContinueWith ( _
task As IVsTask, _
context As VsTaskRunContext, _
options As VsTaskContinuationOptions, _
taskBody As IVsTaskBody, _
asyncState As Object _
) As IVsTask
public static IVsTask ContinueWith(
this IVsTask task,
VsTaskRunContext context,
VsTaskContinuationOptions options,
IVsTaskBody taskBody,
Object asyncState
)
[ExtensionAttribute]
public:
static IVsTask^ ContinueWith(
IVsTask^ task,
VsTaskRunContext context,
VsTaskContinuationOptions options,
IVsTaskBody^ taskBody,
Object^ asyncState
)
static member ContinueWith :
task:IVsTask *
context:VsTaskRunContext *
options:VsTaskContinuationOptions *
taskBody:IVsTaskBody *
asyncState:Object -> IVsTask
public static function ContinueWith(
task : IVsTask,
context : VsTaskRunContext,
options : VsTaskContinuationOptions,
taskBody : IVsTaskBody,
asyncState : Object
) : IVsTask
Parameters
task
Type: Microsoft.VisualStudio.Shell.Interop.IVsTask[in] The task to which to append the action.
context
Type: Microsoft.VisualStudio.Shell.VsTaskRunContext[in] Where to run this task.
options
Type: Microsoft.VisualStudio.Shell.VsTaskContinuationOptions[in] Enables the setting of TPL Task continuation options.
taskBody
Type: Microsoft.VisualStudio.Shell.Interop.IVsTaskBody[in] The action to be executed.
asyncState
Type: Object[in] The asynchronous state for the task.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop.IVsTask
A new IVsTask instance that has the current task as its parent.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IVsTask. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.