TaskAsyncEnumerableExtensions.ConfigureAwait 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ConfigureAwait(IAsyncDisposable, Boolean) |
設定如何執行從非同步可處置項目傳回的工作 await。 |
ConfigureAwait<T>(IAsyncEnumerable<T>, Boolean) |
設定如何執行從非同步反覆項目傳回的工作 await。 |
ConfigureAwait(IAsyncDisposable, Boolean)
設定如何執行從非同步可處置項目傳回的工作 await。
public:
[System::Runtime::CompilerServices::Extension]
static System::Runtime::CompilerServices::ConfiguredAsyncDisposable ConfigureAwait(IAsyncDisposable ^ source, bool continueOnCapturedContext);
public static System.Runtime.CompilerServices.ConfiguredAsyncDisposable ConfigureAwait (this IAsyncDisposable source, bool continueOnCapturedContext);
static member ConfigureAwait : IAsyncDisposable * bool -> System.Runtime.CompilerServices.ConfiguredAsyncDisposable
<Extension()>
Public Function ConfigureAwait (source As IAsyncDisposable, continueOnCapturedContext As Boolean) As ConfiguredAsyncDisposable
參數
- source
- IAsyncDisposable
來源非同步可處置項目。
- continueOnCapturedContext
- Boolean
true
則擷取和封送處理回到目前的內容,否則為 false
。
傳回
已設定的非同步可處置項目。
適用於
ConfigureAwait<T>(IAsyncEnumerable<T>, Boolean)
設定如何執行從非同步反覆項目傳回的工作 await。
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Runtime::CompilerServices::ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait(System::Collections::Generic::IAsyncEnumerable<T> ^ source, bool continueOnCapturedContext);
public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait<T> (this System.Collections.Generic.IAsyncEnumerable<T> source, bool continueOnCapturedContext);
static member ConfigureAwait : System.Collections.Generic.IAsyncEnumerable<'T> * bool -> System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<'T>
<Extension()>
Public Function ConfigureAwait(Of T) (source As IAsyncEnumerable(Of T), continueOnCapturedContext As Boolean) As ConfiguredCancelableAsyncEnumerable(Of T)
類型參數
- T
要逐一查看的物件類型。
參數
- source
- IAsyncEnumerable<T>
要逐一查看的來源可列舉項目。
- continueOnCapturedContext
- Boolean
true
則擷取和封送處理回到目前的內容,否則為 false
。
傳回
已設定的列舉項目。