Upraviť

Zdieľať cez


Task<TResult>.ConfigureAwait Method

Definition

Overloads

ConfigureAwait(Boolean)

Configures an awaiter used to await this Task<TResult>.

ConfigureAwait(ConfigureAwaitOptions)

Configures an awaiter used to await this Task.

ConfigureAwait(Boolean)

Source:
Future.cs
Source:
Future.cs
Source:
Future.cs

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)

Parameters

continueOnCapturedContext
Boolean

true to attempt to marshal the continuation back to the original context captured; otherwise, false.

Returns

An object used to await this task.

Applies to

ConfigureAwait(ConfigureAwaitOptions)

Source:
Future.cs
Source:
Future.cs

Configures an awaiter used to await this Task.

public:
 System::Runtime::CompilerServices::ConfiguredTaskAwaitable<TResult> ConfigureAwait(System::Threading::Tasks::ConfigureAwaitOptions options);
public System.Runtime.CompilerServices.ConfiguredTaskAwaitable<TResult> ConfigureAwait (System.Threading.Tasks.ConfigureAwaitOptions options);
override this.ConfigureAwait : System.Threading.Tasks.ConfigureAwaitOptions -> System.Runtime.CompilerServices.ConfiguredTaskAwaitable<'Result>
Public Function ConfigureAwait (options As ConfigureAwaitOptions) As ConfiguredTaskAwaitable(Of TResult)

Parameters

options
ConfigureAwaitOptions

Options used to configure how awaits on this task are performed.

Returns

An object used to await this task.

Exceptions

The options argument specifies an invalid value.

Applies to