ParallelEnumerable.SequenceEqual ParallelEnumerable.SequenceEqual ParallelEnumerable.SequenceEqual ParallelEnumerable.SequenceEqual Method

Definição

Determina se duas sequências paralelas são iguais comparando os elementos usando um comparador de igualdade para seu tipo.Determines whether two parallel sequences are equal by comparing the elements by using an equality comparer for their type.

Sobrecargas

SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>)

Essa sobrecarga SequenceEqual nunca deve ser chamada.This SequenceEqual 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.

SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>)

Determina se duas sequências paralelas são iguais comparando os elementos usando o comparador de igualdade padrão para o tipo.Determines whether two parallel sequences are equal by comparing the elements by using the default equality comparer for their type.

SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Essa sobrecarga SequenceEqual nunca deve ser chamada.This SequenceEqual 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.

SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>)

Determina se duas sequências paralelas são iguais comparando seus elementos usando um IEqualityComparer{T} especificado.Determines whether two parallel sequences are equal by comparing their elements by using a specified IEqualityComparer{T}.

SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>)

Aviso

Esta API agora é obsoleta.

Essa sobrecarga SequenceEqual nunca deve ser chamada.This SequenceEqual 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 bool SequenceEqual(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 bool SequenceEqual<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second);
static member SequenceEqual : System.Linq.ParallelQuery<'Source> * seq<'Source> -> bool
<Extension()>
Public Function SequenceEqual(Of TSource) (first As ParallelQuery(Of TSource), second As IEnumerable(Of TSource)) As Boolean

Parâmetros de tipo

TSource

Este parâmetro de tipo não é usado.This type parameter is not used.

Parâmetros

first
ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource> 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.

Exceções

Gerada toda vez que esse método é chamado.Thrown every time this method is called.

Comentários

Essa sobrecarga existe para não permitir o uso de SequenceEqual com uma fonte de dados à esquerda do tipo ParallelQuery<TSource> e uma fonte de dados à direita do tipo IEnumerable<T>.This overload exists to disallow usage of SequenceEqual with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. Caso contrário, o operador SequenceEqual apareceria a ligação com a implementação paralela, mas na realidade associaria na implementação sequencial.Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.

Veja também

SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>)

Determina se duas sequências paralelas são iguais comparando os elementos usando o comparador de igualdade padrão para o tipo.Determines whether two parallel sequences are equal by comparing the elements by using the default equality comparer for their type.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static bool SequenceEqual(System::Linq::ParallelQuery<TSource> ^ first, System::Linq::ParallelQuery<TSource> ^ second);
public static bool SequenceEqual<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second);
static member SequenceEqual : System.Linq.ParallelQuery<'Source> * System.Linq.ParallelQuery<'Source> -> bool
<Extension()>
Public Function SequenceEqual(Of TSource) (first As ParallelQuery(Of TSource), second As ParallelQuery(Of TSource)) As Boolean

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> ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource>

Uma sequência à qual comparar em segundo lugar.A sequence to compare to second.

second
ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource>

Uma sequência a comparar com a primeira sequência de entrada.A sequence to compare to the first input sequence.

Retornos

True se duas sequências de origem forem de comprimento igual e seus elementos correspondentes forem iguais de acordo com o comparador de igualdade padrão para seu tipo; caso contrário, false.true if the two source sequences are of equal length and their corresponding elements are equal according to the default equality comparer for their type; otherwise, false.

Exceções

A consulta foi cancelada com o token transmitido pelo WithCancellation.The query was canceled with the token passed in through WithCancellation.

first ou second é uma referência nula (Nothing no Visual Basic).first or second is a null reference (Nothing in Visual Basic).

Uma ou mais exceções ocorreram durante a avaliação da consulta.One or more exceptions occurred during the evaluation of the query.

Veja também

SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

Aviso

Esta API agora é obsoleta.

Essa sobrecarga SequenceEqual nunca deve ser chamada.This SequenceEqual 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 bool SequenceEqual(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 bool SequenceEqual<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Collections.Generic.IEnumerable<TSource> second, System.Collections.Generic.IEqualityComparer<TSource> comparer);
static member SequenceEqual : System.Linq.ParallelQuery<'Source> * seq<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> bool
<Extension()>
Public Function SequenceEqual(Of TSource) (first As ParallelQuery(Of TSource), second As IEnumerable(Of TSource), comparer As IEqualityComparer(Of TSource)) As Boolean

Parâmetros de tipo

TSource

Este parâmetro de tipo não é usado.This type parameter is not used.

Parâmetros

first
ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource> 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.

Exceções

Gerada toda vez que esse método é chamado.Thrown every time this method is called.

Comentários

Essa sobrecarga existe para não permitir o uso de SequenceEqual com uma fonte de dados à esquerda do tipo ParallelQuery<TSource> e uma fonte de dados à direita do tipo IEnumerable<T>.This overload exists to disallow usage of SequenceEqual with a left data source of type ParallelQuery<TSource> and a right data source of type IEnumerable<T>. Caso contrário, o operador SequenceEqual apareceria a ligação com a implementação paralela, mas na realidade associaria a implementação sequencial.Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation.

Veja também

SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(ParallelQuery<TSource>, ParallelQuery<TSource>, IEqualityComparer<TSource>)

Determina se duas sequências paralelas são iguais comparando seus elementos usando um IEqualityComparer{T} especificado.Determines whether two parallel sequences are equal by comparing their elements by using a specified IEqualityComparer{T}.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static bool SequenceEqual(System::Linq::ParallelQuery<TSource> ^ first, System::Linq::ParallelQuery<TSource> ^ second, System::Collections::Generic::IEqualityComparer<TSource> ^ comparer);
public static bool SequenceEqual<TSource> (this System.Linq.ParallelQuery<TSource> first, System.Linq.ParallelQuery<TSource> second, System.Collections.Generic.IEqualityComparer<TSource> comparer);
static member SequenceEqual : System.Linq.ParallelQuery<'Source> * System.Linq.ParallelQuery<'Source> * System.Collections.Generic.IEqualityComparer<'Source> -> bool
<Extension()>
Public Function SequenceEqual(Of TSource) (first As ParallelQuery(Of TSource), second As ParallelQuery(Of TSource), comparer As IEqualityComparer(Of TSource)) As Boolean

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> ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource>

Uma sequência à qual comparar com second.A sequence to compare to second.

second
ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource> ParallelQuery<TSource>

Uma sequência a comparar com a primeira sequência de entrada.A sequence to compare to the first input sequence.

comparer
IEqualityComparer<TSource>

Um IEqualityComparer<T> a ser usado para comparar elementos.An IEqualityComparer<T> to use to compare elements.

Retornos

True se duas sequências de origem forem de comprimento igual e seus elementos correspondentes forem iguais de acordo com o comparador de igualdade padrão para seu tipo; caso contrário, false.true if the two source sequences are of equal length and their corresponding elements are equal according to the default equality comparer for their type; otherwise, false.

Exceções

A consulta foi cancelada com o token transmitido pelo WithCancellation.The query was canceled with the token passed in through WithCancellation.

first ou second é uma referência nula (Nothing no Visual Basic).first or second is a null reference (Nothing in Visual Basic).

Uma ou mais exceções ocorreram durante a avaliação da consulta.One or more exceptions occurred during the evaluation of the query.

Veja também

Aplica-se a