Method ConfigureAwait
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
ConfigureAwait(bool)
public ConfiguredConnectionScope<TConnection> ConfigureAwait(bool continueOnCapturedContext)
Parameters
continueOnCapturedContextbooltrue to continue on the captured context after the connection has been closed, disposed or given back; otherwise false.
Returns
- ConfiguredConnectionScope<TConnection>
A value that disposes the scope asynchronously, configured as asked.
Remarks
Library code takes the scope first, then hands it to await using on its own line:
var scope = await connection.EnsureOpenScopeAsync(cancellationToken).ConfigureAwait(false);
await using var disposal = scope.ConfigureAwait(false);
The library never returns to a caller's context; whether to is the caller's choice at their own call site, as with ConfigureAwait(bool).