<PackageReference Include="AsyncEnumerator" Version="3.1.0" />

Dasync.Collections.ForEachAsyncExtensions

public static class ForEachAsyncExtensions
Enables asynchronous 'foreach' enumeration over an IAsyncEnumerable
public static Task ForEachAsync<T>(this IAsyncEnumerable<T> enumerable, Action<T> action, CancellationToken cancellationToken = default)

Enumerates over all elements in the collection asynchronously

public static Task ForEachAsync<T>(this IAsyncEnumerator<T> enumerator, Action<T> action)

Enumerates over all elements in the collection asynchronously

public static Task ForEachAsync<T>(this IAsyncEnumerable<T> enumerable, Action<T, long> action, CancellationToken cancellationToken = default)

Enumerates over all elements in the collection asynchronously

public static Task ForEachAsync<T>(this IAsyncEnumerator<T> enumerator, Action<T, long> action)

Enumerates over all elements in the collection asynchronously

public static Task ForEachAsync<T>(this IAsyncEnumerable<T> enumerable, Func<T, Task> action, CancellationToken cancellationToken = default)

Enumerates over all elements in the collection asynchronously

public static Task ForEachAsync<T>(this IAsyncEnumerator<T> enumerator, Func<T, Task> action)

Enumerates over all elements in the collection asynchronously

public static Task ForEachAsync<T>(this IAsyncEnumerable<T> enumerable, Func<T, long, Task> action, CancellationToken cancellationToken = default)

Enumerates over all elements in the collection asynchronously

public static Task ForEachAsync<T>(this IAsyncEnumerator<T> enumerator, Func<T, long, Task> action)

Enumerates over all elements in the collection asynchronously