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
scheduler
Type: Microsoft.VisualStudio.Shell.Interop.IVsTaskSchedulerServiceThe task scheduler.
context
Type: Microsoft.VisualStudio.Shell.VsTaskRunContextThe context where the task will be executed.
action
Type: ActionAn anonymous method to execute as the task body.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop.IVsTask
.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.