dotnet / dotnet/reactive

Add (Group)Join overload for working with IEnumerable<T>

Open
#1,978 4 comments 0 reactions 0 assignees View on GitHub
[area] Ix
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

Good Day to you all.

While using the latest 6.0.1 Version of System.Linq.Async I noticed that there is no method overload for joining IEnumerables to an IAsyncEnumerable.

I propose to add the following overloads to the library in order to improve development experience working across asynchronous and synchronous data

```diff
public static partial class AsyncEnumerable{
public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector);
public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector, IEqualityComparer? comparer);
+ public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector);
+ public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector, IEqualityComparer? comparer);

public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector);
public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector, IEqualityComparer? comparer)
+ public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector);
+ public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector, IEqualityComparer? comparer);
}
```

Adding overloads to (Group)JoinAwait and (Group)JoinAwaitWithCancellation may have to get their corresponding overloads as well, but I'm not to sure how the Api should be shaped as an inner keyselector is possible for both ``Func>`` or ``Func``.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.