ParallelEnumerable.Zip Metoda

Definicja

Scala równolegle dwie sekwencje przy użyciu określonej funkcji predykatu.

Przeciążenia

Zip<TFirst,TSecond,TResult>(ParallelQuery<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)
Przestarzałe.

To przeciążenie zip nigdy nie powinno być wywoływane. Ta metoda jest oznaczona jako przestarzała i zawsze zgłaszana NotSupportedException podczas wywołania.

Zip<TFirst,TSecond,TResult>(ParallelQuery<TFirst>, ParallelQuery<TSecond>, Func<TFirst,TSecond,TResult>)

Scala równolegle dwie sekwencje przy użyciu określonej funkcji predykatu.

Zip<TFirst,TSecond,TResult>(ParallelQuery<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)

Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs

Przestroga

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>.

To przeciążenie zip nigdy nie powinno być wywoływane. Ta metoda jest oznaczona jako przestarzała i zawsze zgłaszana NotSupportedException podczas wywołania.

public:
generic <typename TFirst, typename TSecond, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Zip(System::Linq::ParallelQuery<TFirst> ^ first, System::Collections::Generic::IEnumerable<TSecond> ^ second, Func<TFirst, TSecond, 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> Zip<TFirst,TSecond,TResult> (this System.Linq.ParallelQuery<TFirst> first, System.Collections.Generic.IEnumerable<TSecond> second, Func<TFirst,TSecond,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>.")>]
static member Zip : System.Linq.ParallelQuery<'First> * seq<'Second> * Func<'First, 'Second, 'Result> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Zip(Of TFirst, TSecond, TResult) (first As ParallelQuery(Of TFirst), second As IEnumerable(Of TSecond), resultSelector As Func(Of TFirst, TSecond, TResult)) As ParallelQuery(Of TResult)

Parametry typu

TFirst

Ten parametr typu nie jest używany.

TSecond

Ten parametr typu nie jest używany.

TResult

Ten parametr typu nie jest używany.

Parametry

first
ParallelQuery<TFirst>

Ten parametr nie jest używany.

second
IEnumerable<TSecond>

Ten parametr nie jest używany.

resultSelector
Func<TFirst,TSecond,TResult>

Ten parametr nie jest używany.

Zwraca

ParallelQuery<TResult>

To przeciążenie zawsze zgłasza błąd NotSupportedException.

Atrybuty

Wyjątki

Wyjątek, który występuje po wywołaniu tej metody.

Uwagi

To przeciążenie istnieje, aby uniemożliwić użycie pliku Zip z lewym źródłem danych typu ParallelQuery<TSource> i prawym źródłem danych typu IEnumerable<T>. W przeciwnym razie operator zip wydaje się być powiązany z implementacją równoległą, ale w rzeczywistości wiąże się z implementacją sekwencyjną.

Zobacz też

Dotyczy

Zip<TFirst,TSecond,TResult>(ParallelQuery<TFirst>, ParallelQuery<TSecond>, Func<TFirst,TSecond,TResult>)

Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs
Źródło:
ParallelEnumerable.cs

Scala równolegle dwie sekwencje przy użyciu określonej funkcji predykatu.

public:
generic <typename TFirst, typename TSecond, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Zip(System::Linq::ParallelQuery<TFirst> ^ first, System::Linq::ParallelQuery<TSecond> ^ second, Func<TFirst, TSecond, TResult> ^ resultSelector);
public static System.Linq.ParallelQuery<TResult> Zip<TFirst,TSecond,TResult> (this System.Linq.ParallelQuery<TFirst> first, System.Linq.ParallelQuery<TSecond> second, Func<TFirst,TSecond,TResult> resultSelector);
static member Zip : System.Linq.ParallelQuery<'First> * System.Linq.ParallelQuery<'Second> * Func<'First, 'Second, 'Result> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Zip(Of TFirst, TSecond, TResult) (first As ParallelQuery(Of TFirst), second As ParallelQuery(Of TSecond), resultSelector As Func(Of TFirst, TSecond, TResult)) As ParallelQuery(Of TResult)

Parametry typu

TFirst

Typ elementów pierwszej sekwencji.

TSecond

Typ elementów drugiej sekwencji.

TResult

Typ elementów zwracanych.

Parametry

first
ParallelQuery<TFirst>

Pierwsza sekwencja do spakowania.

second
ParallelQuery<TSecond>

Druga sekwencja do spakowania.

resultSelector
Func<TFirst,TSecond,TResult>

Funkcja umożliwiająca utworzenie elementu wyniku na podstawie dwóch pasujących elementów.

Zwraca

ParallelQuery<TResult>

Sekwencja zawierająca elementy typu TResult , które są uzyskiwane przez wykonywanie resultSelector parowania w dwóch sekwencjach. Jeśli długość sekwencji jest nierówna, spowoduje to obcięcie do długości krótszej sekwencji.

Wyjątki

first lub secondresultSelector jest odwołaniem o wartości null (Nic w Visual Basic).

Zapytanie zostało anulowane przy użyciu tokenu przekazanego za pośrednictwem WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken)elementu .

Podczas oceny zapytania wystąpił co najmniej jeden wyjątek.

Dotyczy