共用方式為


TplExtensions.AppendAction Method

Schedules some action for execution at the conclusion of a task.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function AppendAction ( _
    task As Task, _
    action As Action, _
    options As TaskContinuationOptions, _
    cancellation As CancellationToken _
) As Task
public static Task AppendAction(
    this Task task,
    Action action,
    TaskContinuationOptions options,
    CancellationToken cancellation
)
[ExtensionAttribute]
public:
static Task^ AppendAction(
    Task^ task, 
    Action^ action, 
    TaskContinuationOptions options, 
    CancellationToken cancellation
)
static member AppendAction : 
        task:Task * 
        action:Action * 
        options:TaskContinuationOptions * 
        cancellation:CancellationToken -> Task
public static function AppendAction(
    task : Task, 
    action : Action, 
    options : TaskContinuationOptions, 
    cancellation : CancellationToken
) : Task

Parameters

Return Value

Type: System.Threading.Tasks.Task
A Taskthat will execute the action.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Task. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

.NET Framework Security

See Also

Reference

TplExtensions Class

Microsoft.VisualStudio.Threading Namespace