ParallelEnumerable.WithExecutionMode<TSource> Metódus

Definíció

Beállítja a lekérdezés végrehajtási módját.

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

Típusparaméterek

TSource

Az elemek sourcetípusa.

Paraméterek

source
ParallelQuery<TSource>

Egy ParallelQuery, amelyre be szeretné állítani a beállítást.

executionMode
ParallelExecutionMode

A lekérdezés végrehajtásának módja.

Válaszok

A ParallelQuery ugyanazt a lekérdezést jelöli, mint a forrás, de a regisztrált végrehajtási móddal.

Kivételek

source null értékű hivatkozás (Visual Basic semmi).

executionMode érvénytelen ParallelExecutionMode érték.

A WithExecutionMode többször használatos a lekérdezésben.

Megjegyzések

A végrehajtási mód azt határozza meg, hogy a PLINQ megpróbál-e visszaesni a szekvenciális végrehajtásra, ha bizonyos lekérdezési alakzatokat észlel. További információkért és példákért lásd: A végrehajtási mód megadása a PLINQ-ban.

A következőre érvényes:

Lásd még