AsyncEnumerable.Join Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Join<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,CancellationToken,ValueTask<TKey>>, Func<TInner, CancellationToken,ValueTask<TKey>>, Func<TOuter,TInner,CancellationToken, ValueTask<TResult>>, IEqualityComparer<TKey>) |
Correlates the elements of two sequences based on matching keys. |
Join<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>) |
Correlates the elements of two sequences based on matching keys. |
Join<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,CancellationToken,ValueTask<TKey>>, Func<TInner, CancellationToken,ValueTask<TKey>>, Func<TOuter,TInner,CancellationToken, ValueTask<TResult>>, IEqualityComparer<TKey>)
- Source:
- Join.cs
Correlates the elements of two sequences based on matching keys.
public static System.Collections.Generic.IAsyncEnumerable<TResult> Join<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,TInner,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member Join : 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, 'Inner, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Join(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, TInner, CancellationToken, ValueTask(Of TResult)), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of TResult)
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.
- TResult
The type of the result elements.
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,TInner,CancellationToken,ValueTask<TResult>>
A function to create a result element from two matching elements.
- comparer
- IEqualityComparer<TKey>
An IEqualityComparer<T> to use to hash and compare keys.
Returns
An IAsyncEnumerable<T> that has elements of type TResult
that are obtained by performing an inner join on two sequences.
Exceptions
resultSelector
is null
.
Applies to
.NET 10 та інші версії
Продукт | Версії |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
Join<TOuter,TInner,TKey,TResult>(IAsyncEnumerable<TOuter>, IAsyncEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)
- Source:
- Join.cs
Correlates the elements of two sequences based on matching keys.
public static System.Collections.Generic.IAsyncEnumerable<TResult> Join<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,TInner,TResult> resultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member Join : System.Collections.Generic.IAsyncEnumerable<'Outer> * System.Collections.Generic.IAsyncEnumerable<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, 'Inner, 'Result> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Join(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, TInner, TResult), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of TResult)
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.
- TResult
The type of the result elements.
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,TInner,TResult>
A function to create a result element from two matching elements.
- comparer
- IEqualityComparer<TKey>
An IEqualityComparer<T> to use to hash and compare keys.
Returns
An IAsyncEnumerable<T> that has elements of type TResult
that are obtained by performing an inner join on two sequences.
Exceptions
resultSelector
is null
.
Applies to
.NET 10 та інші версії
Продукт | Версії |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided), 10 |
.NET Standard | 2.0 (package-provided) |
Відгук про .NET
.NET – це проект із відкритим кодом. Виберіть посилання, щоб надати відгук: