AsyncEnumerable.TakeWhile Methode

Definitie

Overloads

Name Description
TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,Boolean>)

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is.

TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,Int32,Boolean>)

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is. De index van het element wordt gebruikt in de logica van de predicaatfunctie.

TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<Boolean>>)

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is. De index van het element wordt gebruikt in de logica van de predicaatfunctie.

TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<Boolean>>)

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is.

TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,Boolean>)

Bron:
TakeWhile.cs
Bron:
TakeWhile.cs
Bron:
TakeWhile.cs

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is.

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

Type parameters

TSource

Het type van de elementen van de bron.

Parameters

source
IAsyncEnumerable<TSource>

Een reeks waaruit elementen moeten worden geretourneerd.

predicate
Func<TSource,Boolean>

Een functie om elk element voor een voorwaarde te testen.

Retouren

IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> die de elementen uit de invoerreeks bevat die plaatsvinden vóór het element waarop de test niet meer doorstaat.

Uitzonderingen

predicate is null.

Van toepassing op

TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,Int32,Boolean>)

Bron:
TakeWhile.cs
Bron:
TakeWhile.cs
Bron:
TakeWhile.cs

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is. De index van het element wordt gebruikt in de logica van de predicaatfunctie.

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

Type parameters

TSource

Het type van de elementen van de bron.

Parameters

source
IAsyncEnumerable<TSource>

Een reeks waaruit elementen moeten worden geretourneerd.

predicate
Func<TSource,Int32,Boolean>

Een functie om elk element voor een voorwaarde te testen.

Retouren

IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> die de elementen uit de invoerreeks bevat die plaatsvinden vóór het element waarop de test niet meer doorstaat.

Uitzonderingen

predicate is null.

Van toepassing op

TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<Boolean>>)

Bron:
TakeWhile.cs
Bron:
TakeWhile.cs
Bron:
TakeWhile.cs

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is. De index van het element wordt gebruikt in de logica van de predicaatfunctie.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TSource> ^ TakeWhile(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<bool>> ^ predicate);
public static System.Collections.Generic.IAsyncEnumerable<TSource> TakeWhile<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<bool>> predicate);
static member TakeWhile : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<bool>> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function TakeWhile(Of TSource) (source As IAsyncEnumerable(Of TSource), predicate As Func(Of TSource, Integer, CancellationToken, ValueTask(Of Boolean))) As IAsyncEnumerable(Of TSource)

Type parameters

TSource

Het type van de elementen van de bron.

Parameters

source
IAsyncEnumerable<TSource>

Een reeks waaruit elementen moeten worden geretourneerd.

predicate
Func<TSource,Int32,CancellationToken,ValueTask<Boolean>>

Een functie om elk element voor een voorwaarde te testen.

Retouren

IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> die de elementen uit de invoerreeks bevat die plaatsvinden vóór het element waarop de test niet meer doorstaat.

Uitzonderingen

predicate is null.

Van toepassing op

TakeWhile<TSource>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<Boolean>>)

Bron:
TakeWhile.cs
Bron:
TakeWhile.cs
Bron:
TakeWhile.cs

Retourneert elementen uit een reeks zolang een opgegeven voorwaarde waar is.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IAsyncEnumerable<TSource> ^ TakeWhile(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<bool>> ^ predicate);
public static System.Collections.Generic.IAsyncEnumerable<TSource> TakeWhile<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<bool>> predicate);
static member TakeWhile : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<bool>> -> System.Collections.Generic.IAsyncEnumerable<'Source>
<Extension()>
Public Function TakeWhile(Of TSource) (source As IAsyncEnumerable(Of TSource), predicate As Func(Of TSource, CancellationToken, ValueTask(Of Boolean))) As IAsyncEnumerable(Of TSource)

Type parameters

TSource

Het type van de elementen van de bron.

Parameters

source
IAsyncEnumerable<TSource>

Een reeks waaruit elementen moeten worden geretourneerd.

predicate
Func<TSource,CancellationToken,ValueTask<Boolean>>

Een functie om elk element voor een voorwaarde te testen.

Retouren

IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> die de elementen uit de invoerreeks bevat die plaatsvinden vóór het element waarop de test niet meer doorstaat.

Uitzonderingen

predicate is null.

Van toepassing op