Partilhar via


IVsTaskSchedulerService.CreateTaskEx Method

Definition

Creates a task with the specified options that is run on the given context.

public:
 Microsoft::VisualStudio::Shell::Interop::IVsTask ^ CreateTaskEx(System::UInt32 context, System::UInt32 options, Microsoft::VisualStudio::Shell::Interop::IVsTaskBody ^ pTaskBody, System::Object ^ pAsyncState);
public:
 Microsoft::VisualStudio::Shell::Interop::IVsTask ^ CreateTaskEx(unsigned int context, unsigned int options, Microsoft::VisualStudio::Shell::Interop::IVsTaskBody ^ pTaskBody, Platform::Object ^ pAsyncState);
Microsoft::VisualStudio::Shell::Interop::IVsTask CreateTaskEx(unsigned int context, unsigned int options, Microsoft::VisualStudio::Shell::Interop::IVsTaskBody const & pTaskBody, winrt::Windows::Foundation::IInspectable const & pAsyncState);
public Microsoft.VisualStudio.Shell.Interop.IVsTask CreateTaskEx (uint context, uint options, Microsoft.VisualStudio.Shell.Interop.IVsTaskBody pTaskBody, object pAsyncState);
abstract member CreateTaskEx : uint32 * uint32 * Microsoft.VisualStudio.Shell.Interop.IVsTaskBody * obj -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function CreateTaskEx (context As UInteger, options As UInteger, pTaskBody As IVsTaskBody, pAsyncState As Object) As IVsTask

Parameters

context
UInt32

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

options
UInt32

[in] The creation options set for the task. Values are from __VSTASKCREATIONOPTIONS.

pTaskBody
IVsTaskBody

[in] Action to be executed.

pAsyncState
Object

[in] The asynchronous state of the task.

Returns

The new task instance.

Remarks

This method is safe to access from any thread.

Applies to