ConfiguredTaskAwaitable<TResult>.ConfiguredTaskAwaiter.OnCompleted(Action) 方法

定义

为与此 awaiter 关联的任务计划延续操作。Schedules the continuation action for the task associated with this awaiter.

public:
 virtual void OnCompleted(Action ^ continuation);
public void OnCompleted (Action continuation);
abstract member OnCompleted : Action -> unit
override this.OnCompleted : Action -> unit
Public Sub OnCompleted (continuation As Action)

参数

continuation
Action

在等待操作完成时要调用的操作。The action to invoke when the await operation completes.

实现

例外

continuation 参数为 nullThe continuation argument is null.

awaiter 未正确地初始化。The awaiter was not properly initialized.

注解

此方法供编译器使用;不要直接在代码中使用它。This method is intended for compiler use; do not use it directly in your code.

适用于