ParallelEnumerable.SequenceEqual Método

Definición

Determina si dos secuencias paralelas son iguales; para ello, se comparan sus elementos mediante el comparador de igualdad para su 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>)
Obsoleto.

Nunca se debería llamar a esta sobrecarga SequenceEqual.This SequenceEqual overload should never be called. Este método está marcado como obsoleto y, cuando se llama, siempre produce una excepción NotSupportedException.This method is marked as obsolete and always throws NotSupportedException when called.

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

Determina si dos secuencias paralelas son iguales al comparar los elementos mediante el comparador de igualdad predeterminado para su 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>)
Obsoleto.

Nunca se debería llamar a esta sobrecarga SequenceEqual.This SequenceEqual overload should never be called. Este método está marcado como obsoleto y, cuando se llama, siempre produce una excepción NotSupportedException.This method is marked as obsolete and always throws NotSupportedException when called.

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

Determina si dos secuencias paralelas son iguales al comparar sus elementos mediante un objeto 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>)

Precaución

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.

Nunca se debería llamar a esta sobrecarga SequenceEqual.This SequenceEqual overload should never be called. Este método está marcado como obsoleto y, cuando se llama, siempre produce una excepción NotSupportedException.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);
[<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 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 no se utiliza.This type parameter is not used.

Parámetros

first
ParallelQuery<TSource>

Este parámetro no se utiliza.This parameter is not used.

second
IEnumerable<TSource>

Este parámetro no se utiliza.This parameter is not used.

Devoluciones

Boolean

Esta sobrecarga siempre produce una excepción NotSupportedException.This overload always throws a NotSupportedException.

Atributos

Excepciones

Se produce cada vez que se llama a este método.Thrown every time this method is called.

Comentarios

Esta sobrecarga existe para no permitir el uso de SequenceEqual con un origen de datos izquierdo de tipo ParallelQuery<TSource> y un origen de datos correcto de 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>. De lo contrario, el operador SequenceEqual parecería estar enlazado a la implementación paralela, pero en realidad se enlazaría a la implementación secuencial.Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation.

Se aplica a

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

Determina si dos secuencias paralelas son iguales al comparar los elementos mediante el comparador de igualdad predeterminado para su 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

Tipo de los elementos de las secuencias de entrada.The type of the elements of the input sequences.

Parámetros

first
ParallelQuery<TSource>

Secuencia que se va a comparar con la segunda.A sequence to compare to second.

second
ParallelQuery<TSource>

Secuencia que se va a comparar con la primera secuencia de entrada.A sequence to compare to the first input sequence.

Devoluciones

Boolean

true si las dos secuencias de origen tienen la misma longitud y sus elementos correspondientes son iguales según el comparador de igualdad predeterminado para su tipo; de lo contrario, 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.

Excepciones

Se canceló la consulta con el token que se pasa a través de WithCancellation.The query was canceled with the token passed in through WithCancellation.

first o second es una referencia nula (Nothing en Visual Basic).first or second is a null reference (Nothing in Visual Basic).

Se han producido una o más excepciones durante la evaluación de la consulta.One or more exceptions occurred during the evaluation of the query.

Se aplica a

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

Precaución

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.

Nunca se debería llamar a esta sobrecarga SequenceEqual.This SequenceEqual overload should never be called. Este método está marcado como obsoleto y, cuando se llama, siempre produce una excepción NotSupportedException.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);
[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);
[<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 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 no se utiliza.This type parameter is not used.

Parámetros

first
ParallelQuery<TSource>

Este parámetro no se utiliza.This parameter is not used.

second
IEnumerable<TSource>

Este parámetro no se utiliza.This parameter is not used.

comparer
IEqualityComparer<TSource>

Este parámetro no se utiliza.This parameter is not used.

Devoluciones

Boolean

Esta sobrecarga siempre produce una excepción NotSupportedException.This overload always throws a NotSupportedException.

Atributos

Excepciones

Se produce cada vez que se llama a este método.Thrown every time this method is called.

Comentarios

Esta sobrecarga existe para no permitir el uso de SequenceEqual con un origen de datos izquierdo de tipo ParallelQuery<TSource> y un origen de datos correcto de 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>. De lo contrario, el operador SequenceEqual parecería estar enlazado a la implementación paralela, pero en realidad enlazaría a la implementación secuencial.Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation.

Se aplica a

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

Determina si dos secuencias paralelas son iguales al comparar sus elementos mediante un objeto 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);
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

Tipo de los elementos de las secuencias de entrada.The type of the elements of the input sequences.

Parámetros

first
ParallelQuery<TSource>

Secuencia que se va a comparar con second.A sequence to compare to second.

second
ParallelQuery<TSource>

Secuencia que se va a comparar con la primera secuencia de entrada.A sequence to compare to the first input sequence.

comparer
IEqualityComparer<TSource>

IEqualityComparer<T> que se va a utilizar para comparar elementos.An IEqualityComparer<T> to use to compare elements.

Devoluciones

Boolean

true si las dos secuencias de origen tienen la misma longitud y sus elementos correspondientes son iguales según el comparador de igualdad predeterminado para su tipo; de lo contrario, 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.

Excepciones

Se canceló la consulta con el token que se pasa a través de WithCancellation.The query was canceled with the token passed in through WithCancellation.

first o second es una referencia nula (Nothing en Visual Basic).first or second is a null reference (Nothing in Visual Basic).

Se han producido una o más excepciones durante la evaluación de la consulta.One or more exceptions occurred during the evaluation of the query.

Se aplica a