ParallelEnumerable.Union Método
Definição
Produz a união de conjunto de duas sequências paralelas.Produces the set union of two parallel sequences.
Sobrecargas
| Union<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>) |
Obsoleto.
Essa sobrecarga Union nunca deve ser chamada.This Union overload should never be called. Esse método está marcado como obsoleto e sempre gera NotSupportedException quando chamado.This method is marked as obsolete and always throws NotSupportedException when called. |
| Union<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>) |
Produz a união de conjunto de duas sequências paralelas usando o comparador de igualdade padrão.Produces the set union of two parallel sequences by using the default equality comparer. |
| Union<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
Obsoleto.
Essa sobrecarga Union nunca deve ser chamada.This Union overload should never be called. Esse método está marcado como obsoleto e sempre gera NotSupportedException quando chamado.This method is marked as obsolete and always throws NotSupportedException when called. |
| Union<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>) |
Produz a união de conjunto de duas sequências paralelas usando um IEqualityComparer{T} especificado.Produces the set union of two parallel sequences by using a specified IEqualityComparer{T}. |
Union<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>)
Cuidado
The second data source of a binary operator must be of type System.Linq.ParallelQuery rather than System.Collections.Generic.IEnumerable. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery.
Essa sobrecarga Union nunca deve ser chamada.This Union overload should never be called. Esse método está marcado como obsoleto e sempre gera NotSupportedException quando chamado.This method is marked as obsolete and always throws NotSupportedException when called.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ParallelQuery<TSource> ^ Union(System::Linq::ParallelQuery<TSource> ^ first, System::Collections::Generic::IEnumerable<TSource> ^ second);
[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<TSource> Union<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second);
[<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 Union : System.Linq.ParallelQuery<'Source> * seq<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Union(Of TSource) (first As ParallelQuery(Of TSource), second As IEnumerable(Of TSource)) As ParallelQuery(Of TSource)
Parâmetros de tipo
- TSource
Esse parâmetro de tipo não é usado.This type parameter is not used.
Parâmetros
- first
- ParallelQuery<TSource>
Este parâmetro não é usado.This parameter is not used.
- second
- IEnumerable<TSource>
Este parâmetro não é usado.This parameter is not used.
Retornos
Essa sobrecarga sempre gera um NotSupportedException.This overload always throws a NotSupportedException.
- Atributos
Exceções
A exceção que ocorre quando esse método é chamado.The exception that occurs when this method is called.
A consulta foi cancelada com o token transmitido pelo WithCancellation.The query was canceled with the token passed in through WithCancellation.
Uma ou mais exceções ocorreram durante a avaliação da consulta.One or more exceptions occurred during the evaluation of the query.
Comentários
Essa sobrecarga existe para não permitir o uso de Union com uma fonte de dados esquerda do tipo ParallelQuery<TSource> e uma fonte de dados correta do tipo IEnumerable<T> .This overload exists to disallow usage of Union with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. Caso contrário, o operador Union pareceria estar ligando à implementação paralela, mas, na realidade, seria associado à implementação Sequencial.Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation.
Aplica-se a
Union<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>)
Produz a união de conjunto de duas sequências paralelas usando o comparador de igualdade padrão.Produces the set union of two parallel sequences by using the default equality comparer.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ParallelQuery<TSource> ^ Union(System::Linq::ParallelQuery<TSource> ^ first, System::Linq::ParallelQuery<TSource> ^ second);
public static System.Linq.ParallelQuery<TSource> Union<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second);
static member Union : System.Linq.ParallelQuery<'Source> * System.Linq.ParallelQuery<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Union(Of TSource) (first As ParallelQuery(Of TSource), second As ParallelQuery(Of TSource)) As ParallelQuery(Of TSource)
Parâmetros de tipo
- TSource
O tipo dos elementos das sequências de entrada.The type of the elements of the input sequences.
Parâmetros
- first
- ParallelQuery<TSource>
Uma sequência cujos elementos distintos formam o primeiro conjunto da união.A sequence whose distinct elements form the first set for the union.
- second
- ParallelQuery<TSource>
Uma sequência cujos elementos distintos formam o segundo conjunto da união.A sequence whose distinct elements form the second set for the union.
Retornos
Uma sequência que contém os elementos de ambas as sequências de entrada, exceto as duplicatas.A sequence that contains the elements from both input sequences, excluding duplicates.
Exceções
first ou second é uma referência nula (Nothing no Visual Basic).first or second is a null reference (Nothing in Visual Basic).
A consulta foi cancelada com o token transmitido pelo WithCancellation.The query was canceled with the token passed in through WithCancellation.
Uma ou mais exceções ocorreram durante a avaliação da consulta.One or more exceptions occurred during the evaluation of the query.
Aplica-se a
Union<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)
Cuidado
The second data source of a binary operator must be of type System.Linq.ParallelQuery rather than System.Collections.Generic.IEnumerable. To fix this problem, use the AsParallel() extension method to convert the right data source to System.Linq.ParallelQuery.
Essa sobrecarga Union nunca deve ser chamada.This Union overload should never be called. Esse método está marcado como obsoleto e sempre gera NotSupportedException quando chamado.This method is marked as obsolete and always throws NotSupportedException when called.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ParallelQuery<TSource> ^ Union(System::Linq::ParallelQuery<TSource> ^ first, System::Collections::Generic::IEnumerable<TSource> ^ second, System::Collections::Generic::IEqualityComparer<TSource> ^ comparer);
[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<TSource> Union<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second, System.Collections.Generic.IEqualityComparer<TSource> comparer);
[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<TSource> Union<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second, System.Collections.Generic.IEqualityComparer<TSource>? comparer);
[<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 Union : System.Linq.ParallelQuery<'Source> * seq<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Union(Of TSource) (first As ParallelQuery(Of TSource), second As IEnumerable(Of TSource), comparer As IEqualityComparer(Of TSource)) As ParallelQuery(Of TSource)
Parâmetros de tipo
- TSource
Esse parâmetro de tipo não é usado.This type parameter is not used.
Parâmetros
- first
- ParallelQuery<TSource>
Este parâmetro não é usado.This parameter is not used.
- second
- IEnumerable<TSource>
Este parâmetro não é usado.This parameter is not used.
- comparer
- IEqualityComparer<TSource>
Este parâmetro não é usado.This parameter is not used.
Retornos
Essa sobrecarga sempre gera um NotSupportedException.This overload always throws a NotSupportedException.
- Atributos
Exceções
A exceção que ocorre quando esse método é chamado.The exception that occurs when this method is called.
A consulta foi cancelada com o token transmitido pelo WithCancellation.The query was canceled with the token passed in through WithCancellation.
Uma ou mais exceções ocorreram durante a avaliação da consulta.One or more exceptions occurred during the evaluation of the query.
Comentários
Essa sobrecarga existe para não permitir o uso de Union com uma fonte de dados esquerda do tipo ParallelQuery<TSource> e uma fonte de dados correta do tipo IEnumerable<T> .This overload exists to disallow usage of Union with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. Caso contrário, o operador Union pareceria estar ligando à implementação paralela, mas, na realidade, seria associado à implementação Sequencial.Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.
Aplica-se a
Union<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>)
Produz a união de conjunto de duas sequências paralelas usando um IEqualityComparer{T} especificado.Produces the set union of two parallel sequences by using a specified IEqualityComparer{T}.
public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
static System::Linq::ParallelQuery<TSource> ^ Union(System::Linq::ParallelQuery<TSource> ^ first, System::Linq::ParallelQuery<TSource> ^ second, System::Collections::Generic::IEqualityComparer<TSource> ^ comparer);
public static System.Linq.ParallelQuery<TSource> Union<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second, System.Collections.Generic.IEqualityComparer<TSource> comparer);
public static System.Linq.ParallelQuery<TSource> Union<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second, System.Collections.Generic.IEqualityComparer<TSource>? comparer);
static member Union : System.Linq.ParallelQuery<'Source> * System.Linq.ParallelQuery<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Union(Of TSource) (first As ParallelQuery(Of TSource), second As ParallelQuery(Of TSource), comparer As IEqualityComparer(Of TSource)) As ParallelQuery(Of TSource)
Parâmetros de tipo
- TSource
O tipo dos elementos das sequências de entrada.The type of the elements of the input sequences.
Parâmetros
- first
- ParallelQuery<TSource>
Uma sequência cujos elementos distintos formam o primeiro conjunto da união.A sequence whose distinct elements form the first set for the union.
- second
- ParallelQuery<TSource>
Uma sequência cujos elementos distintos formam o segundo conjunto da união.A sequence whose distinct elements form the second set for the union.
- comparer
- IEqualityComparer<TSource>
Um IEqualityComparer<T> para comparar valores.An IEqualityComparer<T> to compare values.
Retornos
Uma sequência que contém os elementos de ambas as sequências de entrada, exceto as duplicatas.A sequence that contains the elements from both input sequences, excluding duplicates.
Exceções
first ou second é uma referência nula (Nothing no Visual Basic).first or second is a null reference (Nothing in Visual Basic).
A consulta foi cancelada com o token transmitido pelo WithCancellation.The query was canceled with the token passed in through WithCancellation.
Uma ou mais exceções ocorreram durante a avaliação da consulta.One or more exceptions occurred during the evaluation of the query.