AsyncEnumerable.IntersectBy メソッド

定義

オーバーロード

名前 説明
IntersectBy<TSource,TKey>(IAsyncEnumerable<TSource>, IAsyncEnumerable<TKey>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスの集合積集合を生成します。

IntersectBy<TSource,TKey>(IAsyncEnumerable<TSource>, IAsyncEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスの集合積集合を生成します。

IntersectBy<TSource,TKey>(IAsyncEnumerable<TSource>, IAsyncEnumerable<TKey>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)

ソース:
IntersectBy.cs
ソース:
IntersectBy.cs
ソース:
IntersectBy.cs

指定したキー セレクター関数に従って、2 つのシーケンスの集合積集合を生成します。

public static System.Collections.Generic.IAsyncEnumerable<TSource> IntersectBy<TSource,TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> first, System.Collections.Generic.IAsyncEnumerable<TKey> second, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member IntersectBy : System.Collections.Generic.IAsyncEnumerable<'Source> * System.Collections.Generic.IAsyncEnumerable<'Key> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function IntersectBy(Of TSource, TKey) (first As IAsyncEnumerable(Of TSource), second As IAsyncEnumerable(Of TKey), keySelector As Func(Of TSource, CancellationToken, ValueTask(Of TKey)), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of TSource)

型パラメーター

TSource

入力シーケンスの要素の型。

TKey

要素を識別するキーの種類。

パラメーター

first
IAsyncEnumerable<TSource>

IAsyncEnumerable<T>にも出現する個別の要素が返されるsecond

second
IAsyncEnumerable<TKey>

最初のシーケンスにも出現する個別の要素が返される IAsyncEnumerable<T>

keySelector
Func<TSource,CancellationToken,ValueTask<TKey>>

各要素のキーを抽出する関数。

comparer
IEqualityComparer<TKey>

キーを比較する IEqualityComparer<T>

返品

IAsyncEnumerable<TSource>

2 つのシーケンスの集合積集合を形成する要素を含むシーケンス。

例外

keySelectornullです。

注釈

このメソッドは、遅延実行を使用して実装されます。 即時戻り値は、アクションの実行に必要なすべての情報を格納するオブジェクトです。 このメソッドによって表されるクエリは、オブジェクトが 'GetEnumerator' メソッドを直接呼び出すか、Visual C# で 'foreach' を使用するか、Visual Basicの 'For Each' を使用して列挙されるまで実行されません。

2 つのセット A と B の積集合は、B に出現する A のすべての要素を含むセットとして定義されますが、他の要素は含んでいません。

このメソッドによって返されるオブジェクトが列挙されると、'Intersect' は、両方のシーケンスで発生する個別の要素を、 firstに出現する順序で生成します。

comparernullの場合、既定の等値比較子 (Default) を使用して値が比較されます。

適用対象

IntersectBy<TSource,TKey>(IAsyncEnumerable<TSource>, IAsyncEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

ソース:
IntersectBy.cs
ソース:
IntersectBy.cs
ソース:
IntersectBy.cs

指定したキー セレクター関数に従って、2 つのシーケンスの集合積集合を生成します。

public static System.Collections.Generic.IAsyncEnumerable<TSource> IntersectBy<TSource,TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> first, System.Collections.Generic.IAsyncEnumerable<TKey> second, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer = default);
static member IntersectBy : System.Collections.Generic.IAsyncEnumerable<'Source> * System.Collections.Generic.IAsyncEnumerable<'Key> * Func<'Source, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function IntersectBy(Of TSource, TKey) (first As IAsyncEnumerable(Of TSource), second As IAsyncEnumerable(Of TKey), keySelector As Func(Of TSource, TKey), Optional comparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of TSource)

型パラメーター

TSource

入力シーケンスの要素の型。

TKey

要素を識別するキーの種類。

パラメーター

first
IAsyncEnumerable<TSource>

IAsyncEnumerable<T>にも出現する個別の要素が返されるsecond

second
IAsyncEnumerable<TKey>

最初のシーケンスにも出現する個別の要素が返される IAsyncEnumerable<T>

keySelector
Func<TSource,TKey>

各要素のキーを抽出する関数。

comparer
IEqualityComparer<TKey>

キーを比較する IEqualityComparer<T>

返品

IAsyncEnumerable<TSource>

2 つのシーケンスの集合積集合を形成する要素を含むシーケンス。

例外

keySelectornullです。

注釈

このメソッドは、遅延実行を使用して実装されます。 即時戻り値は、アクションの実行に必要なすべての情報を格納するオブジェクトです。 このメソッドによって表されるクエリは、オブジェクトが 'GetEnumerator' メソッドを直接呼び出すか、Visual C# で 'foreach' を使用するか、Visual Basicの 'For Each' を使用して列挙されるまで実行されません。

2 つのセット A と B の積集合は、B に出現する A のすべての要素を含むセットとして定義されますが、他の要素は含んでいません。

このメソッドによって返されるオブジェクトが列挙されると、'Intersect' は、両方のシーケンスで発生する個別の要素を、 firstに出現する順序で生成します。

comparernullの場合、既定の等値比較子 (Default) を使用して値が比較されます。

適用対象