What is the difference in using CountAsync or AsyncEnumerable CountAwaitAsync?
In AsyncEnumerable.cs there is:
public static ValueTask<int> CountAwaitAsync<[Nullable(2)] TSource>(
[Nullable(1)] this IAsyncEnumerable<TSource> source,
[Nullable(new byte[] {1, 1, 0})] Func<TSource, ValueTask<bool>> predicate,
CancellationToken cancellationToken = default (CancellationToken));
- Why is there an await in the name?
- Why can it only be called with a predicate?
Both make no sense to me, but I am sure there is a sense. I don't get it.