Redigera

Dela via


AsyncEnumerable.ExceptBy Method

Definition

Overloads

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

Produces the set difference of two sequences according to a specified key selector function.

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

Produces the set difference of two sequences according to a specified key selector function.

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

Source:
ExceptBy.cs

Produces the set difference of two sequences according to a specified key selector function.

public static System.Collections.Generic.IAsyncEnumerable<TSource> ExceptBy<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 ExceptBy : 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 ExceptBy(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)

Type Parameters

TSource

The type of the elements of the input sequence.

TKey

The type of key to identify elements by.

Parameters

first
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> whose keys that are not also in second will be returned.

second
IAsyncEnumerable<TKey>

An IAsyncEnumerable<T> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.

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

A function to extract the key for each element.

comparer
IEqualityComparer<TKey>

The IEqualityComparer<T> to compare values.

Returns

IAsyncEnumerable<TSource>

A sequence that contains the set difference of the elements of two sequences.

Exceptions

keySelector is null.

Applies to

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

Source:
ExceptBy.cs

Produces the set difference of two sequences according to a specified key selector function.

public static System.Collections.Generic.IAsyncEnumerable<TSource> ExceptBy<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 ExceptBy : 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 ExceptBy(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)

Type Parameters

TSource

The type of the elements of the input sequence.

TKey

The type of key to identify elements by.

Parameters

first
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> whose keys that are not also in second will be returned.

second
IAsyncEnumerable<TKey>

An IAsyncEnumerable<T> whose keys that also occur in the first sequence will cause those elements to be removed from the returned sequence.

keySelector
Func<TSource,TKey>

A function to extract the key for each element.

comparer
IEqualityComparer<TKey>

The IEqualityComparer<T> to compare values.

Returns

IAsyncEnumerable<TSource>

A sequence that contains the set difference of the elements of two sequences.

Exceptions

keySelector is null.

Applies to