ParallelEnumerable.SkipWhile 方法

定义

跳过并行序列中满足指定条件的任何元素,然后返回剩余元素。Bypasses elements in a parallel sequence as long as a specified condition is true and then returns the remaining elements.

重载

SkipWhile<TSource>(ParallelQuery<TSource>, Func<TSource,Boolean>)

跳过并行序列中满足指定条件的任何元素,然后返回剩余元素。Bypasses elements in a parallel sequence as long as a specified condition is true and then returns the remaining elements.

SkipWhile<TSource>(ParallelQuery<TSource>, Func<TSource,Int32,Boolean>)

跳过并行序列中满足指定条件的任何元素,然后返回剩余元素。Bypasses elements in a parallel sequence as long as a specified condition is true and then returns the remaining elements. 将在谓词函数的逻辑中使用元素的索引。The element's index is used in the logic of the predicate function.

SkipWhile<TSource>(ParallelQuery<TSource>, Func<TSource,Boolean>)

跳过并行序列中满足指定条件的任何元素,然后返回剩余元素。Bypasses elements in a parallel sequence as long as a specified condition is true and then returns the remaining elements.

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

类型参数

TSource

source 的元素类型。The type of elements of source.

参数

source
ParallelQuery<TSource>

要从其返回元素的序列。The sequence to return elements from.

predicate
Func<TSource,Boolean>

用于测试每个元素是否满足条件的函数。A function to test each element for a condition.

返回

ParallelQuery<TSource>

一个序列,它包含输入序列中从没有通过谓词指定的测试的线性系列中第一个元素开始的元素。A sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

例外

sourcepredicate 为 null 引用(在 Visual Basic 中为 Nothing)。source or predicate is a null reference (Nothing in Visual Basic).

已使用通过 WithCancellation 传递的令牌取消了查询。The query was canceled with the token passed in through WithCancellation.

评估查询期间发生一个或多个异常。One or more exceptions occurred during the evaluation of the query.

另请参阅

适用于

SkipWhile<TSource>(ParallelQuery<TSource>, Func<TSource,Int32,Boolean>)

跳过并行序列中满足指定条件的任何元素,然后返回剩余元素。Bypasses elements in a parallel sequence as long as a specified condition is true and then returns the remaining elements. 将在谓词函数的逻辑中使用元素的索引。The element's index is used in the logic of the predicate function.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ SkipWhile(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, int, bool> ^ predicate);
public static System.Linq.ParallelQuery<TSource> SkipWhile<TSource> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,int,bool> predicate);
static member SkipWhile : System.Linq.ParallelQuery<'Source> * Func<'Source, int, bool> -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function SkipWhile(Of TSource) (source As ParallelQuery(Of TSource), predicate As Func(Of TSource, Integer, Boolean)) As ParallelQuery(Of TSource)

类型参数

TSource

source 的元素类型。The type of elements of source.

参数

source
ParallelQuery<TSource>

要从其返回元素的序列。The sequence to return elements from.

predicate
Func<TSource,Int32,Boolean>

用于测试每个源元素是否满足条件的函数;该函数的第二个参数表示源元素的索引。A function to test each source element for a condition; the second parameter of the function represents the index of the source element.

返回

ParallelQuery<TSource>

一个序列,它包含输入序列中从没有通过谓词指定的测试的线性系列中第一个元素开始的元素。A sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.

例外

sourcepredicate 为 null 引用(在 Visual Basic 中为 Nothing)。source or predicate is a null reference (Nothing in Visual Basic).

已使用通过 WithCancellation 传递的令牌取消了查询。The query was canceled with the token passed in through WithCancellation.

该查询枚举的元素超过了 MaxValue 个。More than MaxValue elements are enumerated by the query.

评估查询期间发生一个或多个异常。One or more exceptions occurred during the evaluation of the query.

另请参阅

适用于