ParallelEnumerable.Zip Método

Definição

Funde em paralelo duas sequências usando a função predicado especificada.

Sobrecargas

Name Description
Zip<TFirst,TSecond,TResult>(ParallelQuery<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)
Obsoleto.

Esta sobrecarga de Zip nunca deve ser chamada. Este método é marcado como obsoleto e é sempre lançado NotSupportedException quando invocado.

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

Funde em paralelo duas sequências usando a função predicado especificada.

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

Atenção

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

Esta sobrecarga de Zip nunca deve ser chamada. Este método é marcado como obsoleto e é sempre lançado NotSupportedException quando invocado.

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)

Parâmetros de Tipo Genérico

TFirst

Este parâmetro de tipo não é utilizado.

TSecond

Este parâmetro de tipo não é utilizado.

TResult

Este parâmetro de tipo não é utilizado.

Parâmetros

first
ParallelQuery<TFirst>

Este parâmetro não é utilizado.

second
IEnumerable<TSecond>

Este parâmetro não é utilizado.

resultSelector
Func<TFirst,TSecond,TResult>

Este parâmetro não é utilizado.

Devoluções

ParallelQuery<TResult>

Esta sobrecarga gera sempre um NotSupportedException.

Atributos

Exceções

A exceção que ocorre quando este método é chamado.

Observações

Esta sobrecarga existe para impedir o uso do Zip com uma fonte de dados à esquerda do tipo ParallelQuery<TSource> e uma fonte de dados à direita do tipo IEnumerable<T>. Caso contrário, o operador Zip pareceria estar ligado à implementação paralela, mas na realidade ligaria à implementação sequencial.

Ver também

Aplica-se a

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

Funde em paralelo duas sequências usando a função predicado especificada.

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)

Parâmetros de Tipo Genérico

TFirst

O tipo dos elementos da primeira sequência.

TSecond

O tipo dos elementos da segunda sequência.

TResult

O tipo dos elementos de retorno.

Parâmetros

first
ParallelQuery<TFirst>

A primeira sequência para zero.

second
ParallelQuery<TSecond>

A segunda sequência para zero.

resultSelector
Func<TFirst,TSecond,TResult>

Uma função para criar um elemento de resultado a partir de dois elementos correspondentes.

Devoluções

ParallelQuery<TResult>

Uma sequência que tem elementos do tipo TResult obtidos ao executar resultSelector par a par em duas sequências. Se os comprimentos das sequências forem desiguais, isto trunca para o comprimento da sequência mais curta.

Exceções

first ou second ou resultSelector é uma referência nula (Nada em Visual Basic).

Uma ou mais exceções ocorreram durante a avaliação da consulta.

Aplica-se a