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
task
Type: System.Threading.Tasks.TaskThe task.
action
Type: System.ActionThe action.
options
Type: System.Threading.Tasks.TaskContinuationOptionsThe task continuation options.
cancellation
Type: System.Threading.CancellationTokenThe cancellation token.
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
- 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.