Task<TResult>.ConfigureAwait Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om