Delen via


VsTaskLibraryHelper.CreateAndStartTask Method (IVsTaskSchedulerService, VsTaskRunContext, Action)

Creates a Visual Studio task that will be executed in the specified context.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
Public Shared Function CreateAndStartTask ( _
    scheduler As IVsTaskSchedulerService, _
    context As VsTaskRunContext, _
    action As Action _
) As IVsTask
public static IVsTask CreateAndStartTask(
    IVsTaskSchedulerService scheduler,
    VsTaskRunContext context,
    Action action
)
public:
static IVsTask^ CreateAndStartTask(
    IVsTaskSchedulerService^ scheduler, 
    VsTaskRunContext context, 
    Action^ action
)
static member CreateAndStartTask : 
        scheduler:IVsTaskSchedulerService * 
        context:VsTaskRunContext * 
        action:Action -> IVsTask
public static function CreateAndStartTask(
    scheduler : IVsTaskSchedulerService, 
    context : VsTaskRunContext, 
    action : Action
) : IVsTask

Parameters

  • action
    Type: Action

    An anonymous method to execute as the task body.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsTask

.NET Framework Security

See Also

Reference

VsTaskLibraryHelper Class

CreateAndStartTask Overload

Microsoft.VisualStudio.Shell Namespace