AsyncEnumerable.GroupJoin Method

Definition

Overloads

Name Description
GroupJoin<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>,TResult>, IEqualityComparer<TKey>)

Correlates the elements of two sequences based on key equality and groups the results.

GroupJoin<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,CancellationToken,ValueTask<TKey>>, Func<TInner,CancellationToken,ValueTask<TKey>>, Func<TOuter, IEnumerable<TInner>,CancellationToken,ValueTask<TResult>>, IEqualityComparer<TKey>)

Correlates the elements of two sequences based on key equality and groups the results.

GroupJoin<TOuter,TInner,TKey>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,CancellationToken,ValueTask<TKey>>, Func<TInner, CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)

Correlates the elements of two sequences based on key equality and groups the results. If comparer is null or omitted, the default equality comparer is used to compare keys.

GroupJoin<TOuter,TInner,TKey>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, IEqualityComparer<TKey>)

Correlates the elements of two sequences based on key equality and groups the results. If comparer is null or omitted, the default equality comparer is used to compare keys.

GroupJoin<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>,TResult>, IEqualityComparer<TKey>)

Source:
GroupJoin.cs
Source:
GroupJoin.cs
Source:
GroupJoin.cs

Correlates the elements of two sequences based on key equality and groups the results.

public static System.Collections.Generic.IAsyncEnumerable<TResult> GroupJoin<TOuter,TInner,TKey,TResult>(this System.Collections.Generic.IAsyncEnumerable<TOuter> outer, System.Collections.Generic.IAsyncEnumerable<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,System.Collections.Generic.IEnumerable<TInner>,TResult> resultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member GroupJoin : System.Collections.Generic.IAsyncEnumerable<'Outer> * System.Collections.Generic.IAsyncEnumerable<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, seq<'Inner>, 'Result> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function GroupJoin(Of TOuter, TInner, TKey, TResult) (outer As IAsyncEnumerable(Of TOuter), inner As IAsyncEnumerable(Of TInner), outerKeySelector As Func(Of TOuter, TKey), innerKeySelector As Func(Of TInner, TKey), resultSelector As Func(Of TOuter, IEnumerable(Of TInner), TResult), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of TResult)

Type Parameters

TOuter
TInner
TKey
TResult

Parameters

outer
IAsyncEnumerable<TOuter>

The first sequence to join.

inner
IAsyncEnumerable<TInner>

The sequence to join to the first sequence.

outerKeySelector
Func<TOuter,TKey>

A function to extract the join key from each element of the first sequence.

innerKeySelector
Func<TInner,TKey>

A function to extract the join key from each element of the second sequence.

resultSelector
Func<TOuter,IEnumerable<TInner>,TResult>

A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence.

comparer
IEqualityComparer<TKey>

An IEqualityComparer<T> to use to hash and compare keys.

Returns

IAsyncEnumerable<TResult>

An IAsyncEnumerable<T> that contains elements of type TResult that are obtained by performing a grouped join on two sequences.

Exceptions

resultSelector is null.

Applies to

GroupJoin<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,CancellationToken,ValueTask<TKey>>, Func<TInner,CancellationToken,ValueTask<TKey>>, Func<TOuter, IEnumerable<TInner>,CancellationToken,ValueTask<TResult>>, IEqualityComparer<TKey>)

Source:
GroupJoin.cs
Source:
GroupJoin.cs
Source:
GroupJoin.cs

Correlates the elements of two sequences based on key equality and groups the results.

public static System.Collections.Generic.IAsyncEnumerable<TResult> GroupJoin<TOuter,TInner,TKey,TResult>(this System.Collections.Generic.IAsyncEnumerable<TOuter> outer, System.Collections.Generic.IAsyncEnumerable<TInner> inner, Func<TOuter,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> outerKeySelector, Func<TInner,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> innerKeySelector, Func<TOuter,System.Collections.Generic.IEnumerable<TInner>,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member GroupJoin : System.Collections.Generic.IAsyncEnumerable<'Outer> * System.Collections.Generic.IAsyncEnumerable<'Inner> * Func<'Outer, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * Func<'Inner, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * Func<'Outer, seq<'Inner>, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function GroupJoin(Of TOuter, TInner, TKey, TResult) (outer As IAsyncEnumerable(Of TOuter), inner As IAsyncEnumerable(Of TInner), outerKeySelector As Func(Of TOuter, CancellationToken, ValueTask(Of TKey)), innerKeySelector As Func(Of TInner, CancellationToken, ValueTask(Of TKey)), resultSelector As Func(Of TOuter, IEnumerable(Of TInner), CancellationToken, ValueTask(Of TResult)), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of TResult)

Type Parameters

TOuter
TInner
TKey
TResult

Parameters

outer
IAsyncEnumerable<TOuter>

The first sequence to join.

inner
IAsyncEnumerable<TInner>

The sequence to join to the first sequence.

outerKeySelector
Func<TOuter,CancellationToken,ValueTask<TKey>>

A function to extract the join key from each element of the first sequence.

innerKeySelector
Func<TInner,CancellationToken,ValueTask<TKey>>

A function to extract the join key from each element of the second sequence.

resultSelector
Func<TOuter,IEnumerable<TInner>,CancellationToken,ValueTask<TResult>>

A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence.

comparer
IEqualityComparer<TKey>

An IEqualityComparer<T> to use to hash and compare keys.

Returns

IAsyncEnumerable<TResult>

An IAsyncEnumerable<T> that contains elements of type TResult that are obtained by performing a grouped join on two sequences.

Exceptions

resultSelector is null.

Applies to

GroupJoin<TOuter,TInner,TKey>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,CancellationToken,ValueTask<TKey>>, Func<TInner, CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)

Source:
GroupJoin.cs

Correlates the elements of two sequences based on key equality and groups the results. If comparer is null or omitted, the default equality comparer is used to compare keys.

public static System.Collections.Generic.IAsyncEnumerable<System.Linq.IGrouping<TOuter,TInner>> GroupJoin<TOuter,TInner,TKey>(this System.Collections.Generic.IAsyncEnumerable<TOuter> outer, System.Collections.Generic.IAsyncEnumerable<TInner> inner, Func<TOuter,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> outerKeySelector, Func<TInner,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> innerKeySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member GroupJoin : System.Collections.Generic.IAsyncEnumerable<'Outer> * System.Collections.Generic.IAsyncEnumerable<'Inner> * Func<'Outer, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * Func<'Inner, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<System.Linq.IGrouping<'Outer, 'Inner>>
<Extension()>
Public Function GroupJoin(Of TOuter, TInner, TKey) (outer As IAsyncEnumerable(Of TOuter), inner As IAsyncEnumerable(Of TInner), outerKeySelector As Func(Of TOuter, CancellationToken, ValueTask(Of TKey)), innerKeySelector As Func(Of TInner, CancellationToken, ValueTask(Of TKey)), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of IGrouping(Of TOuter, TInner))

Type Parameters

TOuter

The type of the elements of the first sequence.

TInner

The type of the elements of the second sequence.

TKey

The type of the keys returned by the key selector functions.

Parameters

outer
IAsyncEnumerable<TOuter>

The first sequence to join.

inner
IAsyncEnumerable<TInner>

The sequence to join to the first sequence.

outerKeySelector
Func<TOuter,CancellationToken,ValueTask<TKey>>

A function to extract the join key from each element of the first sequence.

innerKeySelector
Func<TInner,CancellationToken,ValueTask<TKey>>

A function to extract the join key from each element of the second sequence.

comparer
IEqualityComparer<TKey>

An IEqualityComparer<T> to hash and compare keys, or null to use Default.

Returns

IAsyncEnumerable<IGrouping<TOuter,TInner>>

An IAsyncEnumerable<T> that contains elements of type IGrouping<TKey,TElement> where each grouping contains the outer element as the key and the matching inner elements.

Exceptions

innerKeySelector is null.

Applies to

GroupJoin<TOuter,TInner,TKey>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, IEqualityComparer<TKey>)

Source:
GroupJoin.cs

Correlates the elements of two sequences based on key equality and groups the results. If comparer is null or omitted, the default equality comparer is used to compare keys.

public static System.Collections.Generic.IAsyncEnumerable<System.Linq.IGrouping<TOuter,TInner>> GroupJoin<TOuter,TInner,TKey>(this System.Collections.Generic.IAsyncEnumerable<TOuter> outer, System.Collections.Generic.IAsyncEnumerable<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member GroupJoin : System.Collections.Generic.IAsyncEnumerable<'Outer> * System.Collections.Generic.IAsyncEnumerable<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<System.Linq.IGrouping<'Outer, 'Inner>>
<Extension()>
Public Function GroupJoin(Of TOuter, TInner, TKey) (outer As IAsyncEnumerable(Of TOuter), inner As IAsyncEnumerable(Of TInner), outerKeySelector As Func(Of TOuter, TKey), innerKeySelector As Func(Of TInner, TKey), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of IGrouping(Of TOuter, TInner))

Type Parameters

TOuter

The type of the elements of the first sequence.

TInner

The type of the elements of the second sequence.

TKey

The type of the keys returned by the key selector functions.

Parameters

outer
IAsyncEnumerable<TOuter>

The first sequence to join.

inner
IAsyncEnumerable<TInner>

The sequence to join to the first sequence.

outerKeySelector
Func<TOuter,TKey>

A function to extract the join key from each element of the first sequence.

innerKeySelector
Func<TInner,TKey>

A function to extract the join key from each element of the second sequence.

comparer
IEqualityComparer<TKey>

An IEqualityComparer<T> to hash and compare keys, or null to use Default.

Returns

IAsyncEnumerable<IGrouping<TOuter,TInner>>

An IAsyncEnumerable<T> that contains elements of type IGrouping<TKey,TElement> where each grouping contains the outer element as the key and the matching inner elements.

Exceptions

innerKeySelector is null.

Applies to