Partilhar via


IVsTaskSchedulerService.CreateTask(UInt32, IVsTaskBody) Method

Definition

Creates a task that is run on the given context.

public:
 Microsoft::VisualStudio::Shell::Interop::IVsTask ^ CreateTask(System::UInt32 context, Microsoft::VisualStudio::Shell::Interop::IVsTaskBody ^ pTaskBody);
public:
 Microsoft::VisualStudio::Shell::Interop::IVsTask ^ CreateTask(unsigned int context, Microsoft::VisualStudio::Shell::Interop::IVsTaskBody ^ pTaskBody);
Microsoft::VisualStudio::Shell::Interop::IVsTask CreateTask(unsigned int context, Microsoft::VisualStudio::Shell::Interop::IVsTaskBody const & pTaskBody);
public Microsoft.VisualStudio.Shell.Interop.IVsTask CreateTask (uint context, Microsoft.VisualStudio.Shell.Interop.IVsTaskBody pTaskBody);
abstract member CreateTask : uint32 * Microsoft.VisualStudio.Shell.Interop.IVsTaskBody -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function CreateTask (context As UInteger, pTaskBody As IVsTaskBody) As IVsTask

Parameters

context
UInt32

[in] Where to run this task. Values are from __VSTASKRUNCONTEXT.

pTaskBody
IVsTaskBody

[in] Action to be executed.

Returns

The task to be run.

Remarks

This method is safe to access from any thread.

Applies to