AsyncEnumerable.ExceptBy 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ExceptBy<TSource,TKey>(IAsyncEnumerable<TSource>, IAsyncEnumerable<TKey>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)
- Source:
- ExceptBy.cs
- Source:
- ExceptBy.cs
- Source:
- ExceptBy.cs
根据指定的键选择器函数生成两个序列的集差异。
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)
类型参数
- TSource
输入序列的元素的类型。
- TKey
要标识元素的键的类型。
参数
- first
- IAsyncEnumerable<TSource>
IAsyncEnumerable<T>将返回不在其中second的键。
- second
- IAsyncEnumerable<TKey>
第一 IAsyncEnumerable<T> 个序列中也发生的键将导致从返回的序列中删除这些元素。
- keySelector
- Func<TSource,CancellationToken,ValueTask<TKey>>
用于提取每个元素的键的函数。
- comparer
- IEqualityComparer<TKey>
要 IEqualityComparer<T> 比较的值。
返回
一个序列,其中包含两个序列的元素集差异。
例外
keySelector 是 null。
适用于
ExceptBy<TSource,TKey>(IAsyncEnumerable<TSource>, IAsyncEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)
- Source:
- ExceptBy.cs
- Source:
- ExceptBy.cs
- Source:
- ExceptBy.cs
根据指定的键选择器函数生成两个序列的集差异。
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)
类型参数
- TSource
输入序列的元素的类型。
- TKey
要标识元素的键的类型。
参数
- first
- IAsyncEnumerable<TSource>
IAsyncEnumerable<T>将返回不在其中second的键。
- second
- IAsyncEnumerable<TKey>
第一 IAsyncEnumerable<T> 个序列中也发生的键将导致从返回的序列中删除这些元素。
- keySelector
- Func<TSource,TKey>
用于提取每个元素的键的函数。
- comparer
- IEqualityComparer<TKey>
要 IEqualityComparer<T> 比较的值。
返回
一个序列,其中包含两个序列的元素集差异。
例外
keySelector 是 null。