TaskAsyncEnumerableExtensions.ConfigureAwait Method

Definition

Overloads

ConfigureAwait(IAsyncDisposable, Boolean)

Configures how awaits on the tasks returned from an async disposable will be performed.

ConfigureAwait<T>(IAsyncEnumerable<T>, Boolean)

Configures how awaits on the tasks returned from an async iteration will be performed.

ConfigureAwait(IAsyncDisposable, Boolean)

Source:
TaskAsyncEnumerableExtensions.cs
Source:
TaskAsyncEnumerableExtensions.cs
Source:
TaskAsyncEnumerableExtensions.cs

Configures how awaits on the tasks returned from an async disposable will be performed.

C#
public static System.Runtime.CompilerServices.ConfiguredAsyncDisposable ConfigureAwait(this IAsyncDisposable source, bool continueOnCapturedContext);

Parameters

source
IAsyncDisposable

The source async disposable.

continueOnCapturedContext
Boolean

Whether to capture and marshal back to the current context.

Returns

The configured async disposable.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.0 (package-provided), 2.1

ConfigureAwait<T>(IAsyncEnumerable<T>, Boolean)

Source:
TaskAsyncEnumerableExtensions.cs
Source:
TaskAsyncEnumerableExtensions.cs
Source:
TaskAsyncEnumerableExtensions.cs

Configures how awaits on the tasks returned from an async iteration will be performed.

C#
public static System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait<T>(this System.Collections.Generic.IAsyncEnumerable<T> source, bool continueOnCapturedContext);

Type Parameters

T

The type of the objects being iterated.

Parameters

source
IAsyncEnumerable<T>

The source enumerable being iterated.

continueOnCapturedContext
Boolean

Whether to capture and marshal back to the current context.

Returns

The configured enumerable.

Applies to

.NET 9 and other versions
Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.0 (package-provided), 2.1