Rediger

Del via


ParallelEnumerable.AsSequential<TSource> Method

Definition

Converts a ParallelQuery<TSource> into an IEnumerable<T> to force sequential evaluation of the query.

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)

Type Parameters

TSource

The type of elements of source.

Parameters

Returns

IEnumerable<TSource>

The source as an IEnumerable<T> to bind to sequential extension methods.

Exceptions

source is a null reference (Nothing in Visual Basic).

Remarks

For more information, see Order Preservation in PLINQ and How to: Control Ordering in a PLINQ Query.

Applies to

See also