ParallelEnumerable.Except 方法

定义

生成两个并行序列的差集。Produces the set difference of two parallel sequences.

重载

Except<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>)

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

Except<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>)

通过使用默认的相等比较器对值进行比较,生成两个并行序列的差集。Produces the set difference of two parallel sequences by using the default equality comparer to compare values.

Except<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

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

Except<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>)

通过使用指定的 IEqualityComparer<T> 对值进行比较产生两个并行序列的差集。Produces the set difference of two parallel sequences by using the specified IEqualityComparer<T> to compare values.

Except<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>)

警告

此 API 现已过时。

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ Except(System::Linq::ParallelQuery<TSource> ^ first, System::Collections::Generic::IEnumerable<TSource> ^ second);
[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<TSource> Except<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second);
static member Except : System.Linq.ParallelQuery<'Source> * seq<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Except(Of TSource) (first As ParallelQuery(Of TSource), second As IEnumerable(Of TSource)) As ParallelQuery(Of TSource)

类型参数

TSource

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

参数

first
ParallelQuery<TSource>

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

second
IEnumerable<TSource>

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

返回

此重载总是会引发 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 Except with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. 否则,Except 运算符似乎绑定到并行实现,但实际上绑定到了顺序实现。Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.

另请参阅

Except<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>)

通过使用默认的相等比较器对值进行比较,生成两个并行序列的差集。Produces the set difference of two parallel sequences by using the default equality comparer to compare values.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ Except(System::Linq::ParallelQuery<TSource> ^ first, System::Linq::ParallelQuery<TSource> ^ second);
public static System.Linq.ParallelQuery<TSource> Except<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second);
static member Except : System.Linq.ParallelQuery<'Source> * System.Linq.ParallelQuery<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Except(Of TSource) (first As ParallelQuery(Of TSource), second As ParallelQuery(Of TSource)) As ParallelQuery(Of TSource)

类型参数

TSource

输入序列中的元素的类型。The type of the elements of the input sequences.

参数

first
ParallelQuery<TSource>

一个序列,其中的未同时出现在 second 中的元素将会返回。A sequence whose elements that are not also in second will be returned.

second
ParallelQuery<TSource>

一个序列,其中的元素如果同时出现在第一个序列中,则将导致从返回的序列中移除这些元素。A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

返回

包含这两个序列的元素的差集的序列。A sequence that contains the set difference of the elements of two sequences.

异常

firstsecond 为 null 引用(在 Visual Basic 中为 Nothing)。first or second is a null reference (Nothing in Visual Basic).

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

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

另请参阅

Except<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

警告

此 API 现已过时。

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

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ Except(System::Linq::ParallelQuery<TSource> ^ first, System::Collections::Generic::IEnumerable<TSource> ^ second, System::Collections::Generic::IEqualityComparer<TSource> ^ 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<TSource> Except<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second, System.Collections.Generic.IEqualityComparer<TSource> comparer);
static member Except : System.Linq.ParallelQuery<'Source> * seq<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Except(Of TSource) (first As ParallelQuery(Of TSource), second As IEnumerable(Of TSource), comparer As IEqualityComparer(Of TSource)) As ParallelQuery(Of TSource)

类型参数

TSource

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

参数

first
ParallelQuery<TSource>

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

second
IEnumerable<TSource>

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

comparer
IEqualityComparer<TSource>

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

返回

此重载总是会引发 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 Except with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. 否则,Except 运算符似乎绑定到并行实现,但实际上绑定到了顺序实现。Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.

另请参阅

Except<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>)

通过使用指定的 IEqualityComparer<T> 对值进行比较产生两个并行序列的差集。Produces the set difference of two parallel sequences by using the specified IEqualityComparer<T> to compare values.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ Except(System::Linq::ParallelQuery<TSource> ^ first, System::Linq::ParallelQuery<TSource> ^ second, System::Collections::Generic::IEqualityComparer<TSource> ^ comparer);
public static System.Linq.ParallelQuery<TSource> Except<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second, System.Collections.Generic.IEqualityComparer<TSource> comparer);
static member Except : System.Linq.ParallelQuery<'Source> * System.Linq.ParallelQuery<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Except(Of TSource) (first As ParallelQuery(Of TSource), second As ParallelQuery(Of TSource), comparer As IEqualityComparer(Of TSource)) As ParallelQuery(Of TSource)

类型参数

TSource

输入序列中的元素的类型。The type of the elements of the input sequences.

参数

first
ParallelQuery<TSource>

一个序列,其中的未同时出现在 second 中的元素将会返回。A sequence whose elements that are not also in second will be returned.

second
ParallelQuery<TSource>

一个序列,其中的元素如果同时出现在第一个序列中,则将导致从返回的序列中移除这些元素。A sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence.

comparer
IEqualityComparer<TSource>

用于比较值的 IEqualityComparer<T>IEqualityComparer<T> to compare values.

返回

包含这两个序列的元素的差集的序列。A sequence that contains the set difference of the elements of two sequences.

异常

firstsecond 为 null 引用(在 Visual Basic 中为 Nothing)。first or second is a null reference (Nothing in Visual Basic).

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

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

另请参阅

适用于