ParallelEnumerable.ToLookup 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ToLookup<TSource,TKey,TElement>(ParallelQuery<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
根据ILookup<TKey,TElement>指定的键选择器函数、比较器和元素选择器函数创建一ParallelQuery<TSource>个。
public:
generic <typename TSource, typename TKey, typename TElement>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ILookup<TKey, TElement> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TElement> ^ elementSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Linq.ILookup<TKey,TElement> ToLookup<TSource,TKey,TElement>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TElement> elementSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
public static System.Linq.ILookup<TKey,TElement> ToLookup<TSource,TKey,TElement>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TElement> elementSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * Func<'Source, 'Element> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.ILookup<'Key, 'Element>
<Extension()>
Public Function ToLookup(Of TSource, TKey, TElement) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TElement), comparer As IEqualityComparer(Of TKey)) As ILookup(Of TKey, TElement)
类型参数
- TSource
的元素 source类型。
- TKey
返回 keySelector的键的类型。
- TElement
返回 elementSelector的值的类型。
参数
- source
- ParallelQuery<TSource>
要从中创建 ILookup<TKey,TElement> 序列。
- keySelector
- Func<TSource,TKey>
用于从每个元素中提取键的函数。
- elementSelector
- Func<TSource,TElement>
一个转换函数,用于从每个元素生成结果元素值。
- comparer
- IEqualityComparer<TKey>
要比较键的一个 IEqualityComparer<T> 。
返回
查找<(Of <(TKey, TElement>)>包含从输入序列中选择的 TElement 类型的值。
例外
source 或 keySelector 或 elementSelector 是空引用(Visual Basic 中没有任何内容)。
在查询评估期间发生一个或多个异常。
另请参阅
适用于
ToLookup<TSource,TKey,TElement>(ParallelQuery<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
根据ILookup<TKey,TElement>指定的键选择器和元素选择器函数创建一个ParallelQuery<TSource>。
public:
generic <typename TSource, typename TKey, typename TElement>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ILookup<TKey, TElement> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, Func<TSource, TElement> ^ elementSelector);
public static System.Linq.ILookup<TKey,TElement> ToLookup<TSource,TKey,TElement>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, Func<TSource,TElement> elementSelector);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * Func<'Source, 'Element> -> System.Linq.ILookup<'Key, 'Element>
<Extension()>
Public Function ToLookup(Of TSource, TKey, TElement) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey), elementSelector As Func(Of TSource, TElement)) As ILookup(Of TKey, TElement)
类型参数
- TSource
的元素 source类型。
- TKey
返回 keySelector的键的类型。
- TElement
返回 elementSelector的值的类型。
参数
- source
- ParallelQuery<TSource>
要从中创建 ILookup<TKey,TElement> 序列。
- keySelector
- Func<TSource,TKey>
用于从每个元素中提取键的函数。
- elementSelector
- Func<TSource,TElement>
一个转换函数,用于从每个元素生成结果元素值。
返回
一个 ILookup<TKey,TElement> ,其中包含从输入序列中选择的类型 TElement 值。
例外
source 或 keySelector 或 elementSelector 是空引用(Visual Basic 中没有任何内容)。
在查询评估期间发生一个或多个异常。
另请参阅
适用于
ToLookup<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
根据ILookup<TKey,TElement>指定的键选择器函数和键比较器创建一个ParallelQuery<TSource>。
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ILookup<TKey, TSource> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Linq.ILookup<TKey,TSource> ToLookup<TSource,TKey>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
public static System.Linq.ILookup<TKey,TSource> ToLookup<TSource,TKey>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.ILookup<'Key, 'Source>
<Extension()>
Public Function ToLookup(Of TSource, TKey) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey), comparer As IEqualityComparer(Of TKey)) As ILookup(Of TKey, TSource)
类型参数
- TSource
的元素 source类型。
- TKey
返回 keySelector的键的类型。
参数
- source
- ParallelQuery<TSource>
要从中创建 ILookup<TKey,TElement> 序列。
- keySelector
- Func<TSource,TKey>
用于从每个元素中提取键的函数。
- comparer
- IEqualityComparer<TKey>
要比较键的一个 IEqualityComparer<T> 。
返回
包含键和值的 A ILookup<TKey,TElement> 。
例外
source 或 keySelector 或为空引用(Visual Basic 中无任何内容)。
在查询评估期间发生一个或多个异常。
另请参阅
适用于
ToLookup<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>)
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
- Source:
- ParallelEnumerable.cs
根据ILookup<TKey,TElement>指定的键选择器函数创建一个ParallelQuery<TSource>。
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ILookup<TKey, TSource> ^ ToLookup(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TKey> ^ keySelector);
public static System.Linq.ILookup<TKey,TSource> ToLookup<TSource,TKey>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TKey> keySelector);
static member ToLookup : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Key> -> System.Linq.ILookup<'Key, 'Source>
<Extension()>
Public Function ToLookup(Of TSource, TKey) (source As ParallelQuery(Of TSource), keySelector As Func(Of TSource, TKey)) As ILookup(Of TKey, TSource)
类型参数
- TSource
的元素 source类型。
- TKey
返回 keySelector的键的类型。
参数
- source
- ParallelQuery<TSource>
要从中创建 ILookup<TKey,TElement> 序列。
- keySelector
- Func<TSource,TKey>
用于从每个元素中提取键的函数。
返回
包含键和值的 A ILookup<TKey,TElement> 。
例外
source 或 keySelector 是空引用(Visual Basic 中没有任何内容)。
在查询评估期间发生一个或多个异常。