AsyncEnumerable.IntersectBy 메서드

정의

오버로드

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

지정된 키 선택기 함수에 따라 두 시퀀스의 집합 교집합을 생성합니다.

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

지정된 키 선택기 함수에 따라 두 시퀀스의 집합 교집합을 생성합니다.

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

Source:
IntersectBy.cs
Source:
IntersectBy.cs
Source:
IntersectBy.cs

지정된 키 선택기 함수에 따라 두 시퀀스의 집합 교집합을 생성합니다.

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>

두 시퀀스의 집합 교집합을 형성하는 요소가 들어 있는 시퀀스입니다.

예외

keySelectornull입니다.

설명

이 메서드는 지연된 실행을 사용하여 구현됩니다. 즉시 반환 값은 작업을 수행하는 데 필요한 모든 정보를 저장하는 개체입니다. 이 메서드가 나타내는 쿼리는 개체가 'GetEnumerator' 메서드를 직접 호출하거나 Visual C#에서 'foreach' 또는 Visual Basic 'For Each'를 사용하여 열거될 때까지 실행되지 않습니다.

두 집합 A와 B의 교집합은 B에도 표시되지만 다른 요소는 없는 A의 모든 요소를 포함하는 집합으로 정의됩니다.

이 메서드에서 반환된 개체가 열거되면 'Intersect'는 두 시퀀스에서 나타나는 순서대로 first고유한 요소를 생성합니다.

comparer기본 같음 비교자null인 경우 Default 값을 비교하는 데 사용됩니다.

적용 대상

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

Source:
IntersectBy.cs
Source:
IntersectBy.cs
Source:
IntersectBy.cs

지정된 키 선택기 함수에 따라 두 시퀀스의 집합 교집합을 생성합니다.

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>

두 시퀀스의 집합 교집합을 형성하는 요소가 들어 있는 시퀀스입니다.

예외

keySelectornull입니다.

설명

이 메서드는 지연된 실행을 사용하여 구현됩니다. 즉시 반환 값은 작업을 수행하는 데 필요한 모든 정보를 저장하는 개체입니다. 이 메서드가 나타내는 쿼리는 개체가 'GetEnumerator' 메서드를 직접 호출하거나 Visual C#에서 'foreach' 또는 Visual Basic 'For Each'를 사용하여 열거될 때까지 실행되지 않습니다.

두 집합 A와 B의 교집합은 B에도 표시되지만 다른 요소는 없는 A의 모든 요소를 포함하는 집합으로 정의됩니다.

이 메서드에서 반환된 개체가 열거되면 'Intersect'는 두 시퀀스에서 나타나는 순서대로 first고유한 요소를 생성합니다.

comparer기본 같음 비교자null인 경우 Default 값을 비교하는 데 사용됩니다.

적용 대상