src/Shared/EntityFramework/Infrastructure/IDbAsyncEnumerableExtensions.cs
// <summary>
// Asynchronously executes the provided action on each element of the <see cref="IDbAsyncEnumerable{T}" />.
// </summary>
// <param name="action"> The action to be executed. </param>
// <param name="cancellationToken"> The token to monitor for cancellation requests. </param>
// <returns> A Task representing the asynchronous operation. </returns>
Asynchronously executes the provided action on each element of the .
Asynchronously executes the provided action on each element of the .
internal static Task ForEachAsync<T>(
            this IDbAsyncEnumerable<T> source, Action<T> action, CancellationToken cancellationToken)
        {
            DebugCheck.NotNull(source);
            DebugCheck.NotNull(action);
            return ForEachAsync(source.GetAsyncEnumerator(), action, cancellationToken);
        }
internal static Task ForEachAsync < T > ( this IDbAsyncEnumerable < T > source , Action < T > action , CancellationToken cancellationToken ) { DebugCheck . NotNull ( source ) ; DebugCheck . NotNull ( action ) ; return ForEachAsync ( source . GetAsyncEnumerator ( ) , action , cancellationToken ) ; }
Asynchronously executes the provided action on each element of the .
Asynchronously executes the provided action on each element of the .
A Task representing the asynchronous operation.
A Task representing the asynchronous operation .
IDbAsyncEnumerable<T>
this
action
Action<T>
The action to be executed.
The action to be executed .
cancellationToken
CancellationToken
The token to monitor for cancellation requests.
The token to monitor for cancellation requests .