Task<TResult>.ConfigureAwait(Boolean) 方法

定義

設定用來等候這個 Task<TResult> 的 awaiter。Configures an awaiter used to await this Task<TResult>.

public:
 System::Runtime::CompilerServices::ConfiguredTaskAwaitable<TResult> ConfigureAwait(bool continueOnCapturedContext);
public System.Runtime.CompilerServices.ConfiguredTaskAwaitable<TResult> ConfigureAwait (bool continueOnCapturedContext);
override this.ConfigureAwait : bool -> System.Runtime.CompilerServices.ConfiguredTaskAwaitable<'Result>
Public Function ConfigureAwait (continueOnCapturedContext As Boolean) As ConfiguredTaskAwaitable(Of TResult)

參數

continueOnCapturedContext
Boolean

true 表示嘗試將接續封送處理回擷取的原始內容,否則為 false。true to attempt to marshal the continuation back to the original context captured; otherwise, false.

傳回

等候這項工作所用的物件。An object used to await this task.

適用於