Correlates the elements of two collections based on equality of keys and groups the results.

Namespace:  C1.LiveLinq
Assembly:  C1.LiveLinq (in C1.LiveLinq.dll)

Syntax

C#
public static IIndexedSource<TResult> GroupJoin<TOuter, TInner, TKey, TResult>(
	this IIndexedSource<TOuter> outer,
	IEnumerable<TInner> inner,
	Expression<Func<TOuter, TKey>> outerKeySelector,
	Expression<Func<TInner, TKey>> innerKeySelector,
	Expression<Func<TOuter, IEnumerable<TInner>, TResult>> resultSelector
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function GroupJoin(Of TOuter, TInner, TKey, TResult) ( _
	outer As IIndexedSource(Of TOuter), _
	inner As IEnumerable(Of TInner), _
	outerKeySelector As Expression(Of Func(Of TOuter, TKey)), _
	innerKeySelector As Expression(Of Func(Of TInner, TKey)), _
	resultSelector As Expression(Of Func(Of TOuter, IEnumerable(Of TInner), TResult)) _
) As IIndexedSource(Of TResult)

Parameters

outer
Type: C1.LiveLinq.Indexing..::..IIndexedSource<(Of <(<'TOuter>)>)>
The first collection to join.
inner
Type: System.Collections.Generic..::..IEnumerable<(Of <(<'TInner>)>)>
The collection to join to the first collection.
outerKeySelector
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'TOuter, TKey>)>)>>)>)>
A function to extract the join key from each element of the first collection.
innerKeySelector
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'TInner, TKey>)>)>>)>)>
A function to extract the join key from each element of the second collection.
resultSelector
Type: System.Linq.Expressions..::..Expression<(Of <(<'Func<(Of <(<'TOuter, IEnumerable<(Of <(<'TInner>)>)>, TResult>)>)>>)>)>
A function to create a result element from an element from the first collection and a collection of matching elements from the second collection.

Type Parameters

TOuter
The type of the elements of the first collection.
TInner
The type of the elements of the second collection.
TKey
The type of the keys returned by the key selector functions.
TResult
The type of the result elements.

Return Value

An IIndexedSource<TResult> that contains elements of type TResult that are obtained by performing a grouped join on two collections.

See Also