ParallelEnumerable.Join 方法

定义

基于匹配键对两个序列的元素进行并行关联。Correlates in parallel the elements of two sequences based on matching keys.

重载

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)
已过时。

切勿调用此 Join 重载。This Join overload should never be called. 此方法已标记为过时,调用此方法时总是会引发 NotSupportedExceptionThis method is marked as obsolete and always throws NotSupportedException when invoked.

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, ParallelQuery<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)

基于匹配键对两个序列的元素进行并行关联。Correlates in parallel the elements of two sequences based on matching keys. 使用默认的相等比较器对键进行比较。The default equality comparer is used to compare keys.

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)
已过时。

切勿调用此 Join 重载。This Join overload should never be called. 此方法已标记为过时,调用此方法时总是会引发 NotSupportedExceptionThis method is marked as obsolete and always throws NotSupportedException when invoked.

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, ParallelQuery<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)

基于匹配键对两个序列的元素进行并行关联。Correlates in parallel the elements of two sequences based on matching keys. 使用指定的 IEqualityComparer<T> 对键进行比较。A specified IEqualityComparer<T> is used to compare keys.

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)

注意

The second data source of a binary operator must be of type System.Linq.ParallelQuery rather than System.Collections.Generic.IEnumerable. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery.

切勿调用此 Join 重载。This Join overload should never be called. 此方法已标记为过时,调用此方法时总是会引发 NotSupportedExceptionThis method is marked as obsolete and always throws NotSupportedException when invoked.

public:
generic <typename TOuter, typename TInner, typename TKey, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Join(System::Linq::ParallelQuery<TOuter> ^ outer, System::Collections::Generic::IEnumerable<TInner> ^ inner, Func<TOuter, TKey> ^ outerKeySelector, Func<TInner, TKey> ^ innerKeySelector, Func<TOuter, TInner, TResult> ^ resultSelector);
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Collections.Generic.IEnumerable<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector);
[System.Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Collections.Generic.IEnumerable<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector);
static member Join : System.Linq.ParallelQuery<'Outer> * seq<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, 'Inner, 'Result> -> System.Linq.ParallelQuery<'Result>
[<System.Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")>]
static member Join : System.Linq.ParallelQuery<'Outer> * seq<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, 'Inner, 'Result> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Join(Of TOuter, TInner, TKey, TResult) (outer As ParallelQuery(Of TOuter), inner As IEnumerable(Of TInner), outerKeySelector As Func(Of TOuter, TKey), innerKeySelector As Func(Of TInner, TKey), resultSelector As Func(Of TOuter, TInner, TResult)) As ParallelQuery(Of TResult)

类型参数

TOuter

未使用此类型参数。This type parameter is not used.

TInner

未使用此类型参数。This type parameter is not used.

TKey

未使用此类型参数。This type parameter is not used.

TResult

未使用此类型参数。This type parameter is not used.

参数

outer
ParallelQuery<TOuter>

未使用此参数。This parameter is not used.

inner
IEnumerable<TInner>

未使用此参数。This parameter is not used.

outerKeySelector
Func<TOuter,TKey>

未使用此参数。This parameter is not used.

innerKeySelector
Func<TInner,TKey>

未使用此参数。This parameter is not used.

resultSelector
Func<TOuter,TInner,TResult>

未使用此参数。This parameter is not used.

返回

ParallelQuery<TResult>

此重载总是会引发 NotSupportedExceptionThis overload always throws a NotSupportedException.

属性

例外

调用此方法时发生的异常。The exception that occurs when this method is called.

注解

此重载用于禁止使用与类型的左侧数据源 ParallelQuery<TSource> 和类型为的右侧数据源的使用联接 IEnumerable<T>This overload exists to disallow usage Join with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. 否则,联接运算符似乎绑定到并行实现,但实际上绑定到了顺序实现。Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.

另请参阅

适用于

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, ParallelQuery<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)

基于匹配键对两个序列的元素进行并行关联。Correlates in parallel the elements of two sequences based on matching keys. 使用默认的相等比较器对键进行比较。The default equality comparer is used to compare keys.

public:
generic <typename TOuter, typename TInner, typename TKey, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Join(System::Linq::ParallelQuery<TOuter> ^ outer, System::Linq::ParallelQuery<TInner> ^ inner, Func<TOuter, TKey> ^ outerKeySelector, Func<TInner, TKey> ^ innerKeySelector, Func<TOuter, TInner, TResult> ^ resultSelector);
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Linq.ParallelQuery<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector);
static member Join : System.Linq.ParallelQuery<'Outer> * System.Linq.ParallelQuery<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, 'Inner, 'Result> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Join(Of TOuter, TInner, TKey, TResult) (outer As ParallelQuery(Of TOuter), inner As ParallelQuery(Of TInner), outerKeySelector As Func(Of TOuter, TKey), innerKeySelector As Func(Of TInner, TKey), resultSelector As Func(Of TOuter, TInner, TResult)) As ParallelQuery(Of TResult)

类型参数

TOuter

第一个序列中的元素的类型。The type of the elements of the first sequence.

TInner

第二个序列中的元素的类型。The type of the elements of the second sequence.

TKey

键选择器函数返回的键的类型。The type of the keys returned by the key selector functions.

TResult

结果元素的类型。The type of the result elements.

参数

outer
ParallelQuery<TOuter>

要联接的第一个序列。The first sequence to join.

inner
ParallelQuery<TInner>

要与第一个序列联接的序列。The sequence to join to the first sequence.

outerKeySelector
Func<TOuter,TKey>

用于从第一个序列的每个元素提取联接键的函数。A function to extract the join key from each element of the first sequence.

innerKeySelector
Func<TInner,TKey>

用于从第二个序列的每个元素提取联接键的函数。A function to extract the join key from each element of the second sequence.

resultSelector
Func<TOuter,TInner,TResult>

用于从两个匹配元素创建结果元素的函数。A function to create a result element from two matching elements.

返回

ParallelQuery<TResult>

一个序列,其中包含通过对两个序列执行内部联接获得的 TResult 类型的元素。A sequence that has elements of type TResult that are obtained by performing an inner join on two sequences.

例外

已使用通过 WithCancellation 传递的令牌取消了查询。The query was canceled with the token passed in through WithCancellation.

sourceactionouterinnerouterKeySelectorinnerKeySelectorresultSelectornull(Visual Basic 中为 Nothing)。source or action or outer or inner or outerKeySelector or innerKeySelector or resultSelector is null (Nothing in Visual Basic).

评估查询期间发生一个或多个异常。One or more exceptions occurred during the evaluation of the query.

另请参阅

适用于

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)

注意

The second data source of a binary operator must be of type System.Linq.ParallelQuery rather than System.Collections.Generic.IEnumerable. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery.

切勿调用此 Join 重载。This Join overload should never be called. 此方法已标记为过时,调用此方法时总是会引发 NotSupportedExceptionThis method is marked as obsolete and always throws NotSupportedException when invoked.

public:
generic <typename TOuter, typename TInner, typename TKey, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Join(System::Linq::ParallelQuery<TOuter> ^ outer, System::Collections::Generic::IEnumerable<TInner> ^ inner, Func<TOuter, TKey> ^ outerKeySelector, Func<TInner, TKey> ^ innerKeySelector, Func<TOuter, TInner, TResult> ^ resultSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Collections.Generic.IEnumerable<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
[System.Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Collections.Generic.IEnumerable<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
[System.Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")]
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Collections.Generic.IEnumerable<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
static member Join : System.Linq.ParallelQuery<'Outer> * seq<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, 'Inner, 'Result> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.ParallelQuery<'Result>
[<System.Obsolete("The second data source of a binary operator must be of type System.Linq.ParallelQuery<T> rather than System.Collections.Generic.IEnumerable<T>. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery<T>.")>]
static member Join : System.Linq.ParallelQuery<'Outer> * seq<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, 'Inner, 'Result> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Join(Of TOuter, TInner, TKey, TResult) (outer As ParallelQuery(Of TOuter), inner As IEnumerable(Of TInner), outerKeySelector As Func(Of TOuter, TKey), innerKeySelector As Func(Of TInner, TKey), resultSelector As Func(Of TOuter, TInner, TResult), comparer As IEqualityComparer(Of TKey)) As ParallelQuery(Of TResult)

类型参数

TOuter

未使用此类型参数。This type parameter is not used.

TInner

未使用此类型参数。This type parameter is not used.

TKey

未使用此类型参数。This type parameter is not used.

TResult

未使用此类型参数。This type parameter is not used.

参数

outer
ParallelQuery<TOuter>

未使用此参数。This parameter is not used.

inner
IEnumerable<TInner>

未使用此参数。This parameter is not used.

outerKeySelector
Func<TOuter,TKey>

未使用此参数。This parameter is not used.

innerKeySelector
Func<TInner,TKey>

未使用此参数。This parameter is not used.

resultSelector
Func<TOuter,TInner,TResult>

未使用此参数。This parameter is not used.

comparer
IEqualityComparer<TKey>

未使用此参数。This parameter is not used.

返回

ParallelQuery<TResult>

此重载总是会引发 NotSupportedExceptionThis overload always throws a NotSupportedException.

属性

例外

调用此方法时发生的异常。The exception that occurs when this method is called.

注解

此重载用于禁止联接使用类型为的左侧数据源 ParallelQuery<TSource> 和类型为的右侧数据源 IEnumerable<T>This overload exists to disallow usage of Join with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. 否则,联接运算符似乎绑定到并行实现,但实际上绑定到了顺序实现。Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.

另请参阅

适用于

Join<TOuter,TInner,TKey,TResult>(ParallelQuery<TOuter>, ParallelQuery<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)

基于匹配键对两个序列的元素进行并行关联。Correlates in parallel the elements of two sequences based on matching keys. 使用指定的 IEqualityComparer<T> 对键进行比较。A specified IEqualityComparer<T> is used to compare keys.

public:
generic <typename TOuter, typename TInner, typename TKey, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Join(System::Linq::ParallelQuery<TOuter> ^ outer, System::Linq::ParallelQuery<TInner> ^ inner, Func<TOuter, TKey> ^ outerKeySelector, Func<TInner, TKey> ^ innerKeySelector, Func<TOuter, TInner, TResult> ^ resultSelector, System::Collections::Generic::IEqualityComparer<TKey> ^ comparer);
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Linq.ParallelQuery<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector, System.Collections.Generic.IEqualityComparer<TKey> comparer);
public static System.Linq.ParallelQuery<TResult> Join<TOuter,TInner,TKey,TResult> (this System.Linq.ParallelQuery<TOuter> outer, System.Linq.ParallelQuery<TInner> inner, Func<TOuter,TKey> outerKeySelector, Func<TInner,TKey> innerKeySelector, Func<TOuter,TInner,TResult> resultSelector, System.Collections.Generic.IEqualityComparer<TKey>? comparer);
static member Join : System.Linq.ParallelQuery<'Outer> * System.Linq.ParallelQuery<'Inner> * Func<'Outer, 'Key> * Func<'Inner, 'Key> * Func<'Outer, 'Inner, 'Result> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Join(Of TOuter, TInner, TKey, TResult) (outer As ParallelQuery(Of TOuter), inner As ParallelQuery(Of TInner), outerKeySelector As Func(Of TOuter, TKey), innerKeySelector As Func(Of TInner, TKey), resultSelector As Func(Of TOuter, TInner, TResult), comparer As IEqualityComparer(Of TKey)) As ParallelQuery(Of TResult)

类型参数

TOuter

第一个序列中的元素的类型。The type of the elements of the first sequence.

TInner

第二个序列中的元素的类型。The type of the elements of the second sequence.

TKey

键选择器函数返回的键的类型。The type of the keys returned by the key selector functions.

TResult

结果元素的类型。The type of the result elements.

参数

outer
ParallelQuery<TOuter>

要联接的第一个序列。The first sequence to join.

inner
ParallelQuery<TInner>

要与第一个序列联接的序列。The sequence to join to the first sequence.

outerKeySelector
Func<TOuter,TKey>

用于从第一个序列的每个元素提取联接键的函数。A function to extract the join key from each element of the first sequence.

innerKeySelector
Func<TInner,TKey>

用于从第二个序列的每个元素提取联接键的函数。A function to extract the join key from each element of the second sequence.

resultSelector
Func<TOuter,TInner,TResult>

用于从两个匹配元素创建结果元素的函数。A function to create a result element from two matching elements.

comparer
IEqualityComparer<TKey>

用于对键进行哈希处理和比较的 IEqualityComparer<T>An IEqualityComparer<T> to hash and compare keys.

返回

ParallelQuery<TResult>

一个序列,其中包含通过对两个序列执行内部联接获得的 TResult 类型的元素。A sequence that has elements of type TResult that are obtained by performing an inner join on two sequences.

例外

已使用通过 WithCancellation 传递的令牌取消了查询。The query was canceled with the token passed in through WithCancellation.

sourceactionouterinnerouterKeySelectorinnerKeySelectorresultSelectornull(Visual Basic 中为 Nothing)。source or action or outer or inner or outerKeySelector or innerKeySelector or resultSelector is null (Nothing in Visual Basic).

评估查询期间发生一个或多个异常。One or more exceptions occurred during the evaluation of the query.

另请参阅

适用于