Compartilhar via


VsTaskLibraryHelper.CreateTaskBody<T> Method (Action<T>)

Creates a task body that can be consumed by the task scheduler service.

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

Syntax

'Declaration
Public Shared Function CreateTaskBody(Of T) ( _
    action As Action(Of T) _
) As IVsTaskBody
public static IVsTaskBody CreateTaskBody<T>(
    Action<T> action
)
public:
generic<typename T>
static IVsTaskBody^ CreateTaskBody(
    Action<T>^ action
)
static member CreateTaskBody : 
        action:Action<'T> -> IVsTaskBody
JScript does not support generic types or methods.

Type Parameters

  • T
    The type of object to create.

Parameters

  • action
    Type: Action<T>

    [in] Anonymous method to execute as the task body.

Return Value

Type: Microsoft.VisualStudio.Shell.Interop.IVsTaskBody
An implementation of IVsTaskBody.

.NET Framework Security

See Also

Reference

VsTaskLibraryHelper Class

CreateTaskBody Overload

Microsoft.VisualStudio.Shell Namespace