ParallelEnumerable.AsSequential<TSource> 方法

定义

ParallelQuery<TSource> 转换为 IEnumerable<T> 以强制对查询进行顺序计算。

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<TSource> ^ AsSequential(System::Linq::ParallelQuery<TSource> ^ source);
public static System.Collections.Generic.IEnumerable<TSource> AsSequential<TSource> (this System.Linq.ParallelQuery<TSource> source);
static member AsSequential : System.Linq.ParallelQuery<'Source> -> seq<'Source>
<Extension()>
Public Function AsSequential(Of TSource) (source As ParallelQuery(Of TSource)) As IEnumerable(Of TSource)

类型参数

TSource

source 的元素类型。

参数

返回

IEnumerable<TSource>

作为要绑定到顺序扩展方法的 IEnumerable<T> 的源。

例外

source 为 null 引用(在 Visual Basic 中为 Nothing)。

注解

有关详细信息,请参阅 PLINQ 中的订单保留 以及如何 :控制 PLINQ 查询中的排序

适用于

另请参阅