Open WhatzGames opened 1 year ago
For the IEnumerable DistinctBy was already added in .Net 6.
This feature is currently missing for the IAsynEnumerable.
I therefore propose to add the following API:
public static IAsyncEnumerable<TSource> DistinctBy<TSource, TKey>(this IAsyncEnumerable<T> source, Func<TSource, TKey> keySelector); public static IAsyncEnumerable<TSource> DistinctBy<TSource, TKey>(this IAsyncEnumerable<T> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey>); public static IAsyncEnumerable<TSource> DistinctBy<TSource, TKey>(this IAsyncEnumerable<T> source, Func<TSource, ValueTask<TKey>> keySelector); public static IAsyncEnumerable<TSource> DistinctBy<TSource, TKey>(this IAsyncEnumerable<T> source, Func<TSource, valueTask<TKey>> keySelector, IEqualityComparer<TKey>);
If approved, I would like to give it a try myself.
Related to #2048
I wanted to post here that we could really use DistinctBy for IAsyncEnumerable.
DistinctBy
For the IEnumerable DistinctBy was already added in .Net 6.
This feature is currently missing for the IAsynEnumerable.
I therefore propose to add the following API:
If approved, I would like to give it a try myself.