AsyncEnumerable.AllAsync Method (System.Linq) (original) (raw)
Definition
Namespace:
Assembly:
System.Linq.AsyncEnumerable.dll
Package:
System.Linq.AsyncEnumerable v10.0.0-preview.4.25258.110
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AllAsync(IAsyncEnumerable, Func<TSource,Boolean>, CancellationToken)
Source:
Determines whether all elements of a sequence satisfy a condition.
public static System.Threading.Tasks.ValueTask<bool> AllAsync<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,bool> predicate, System.Threading.CancellationToken cancellationToken = default);
static member AllAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, bool> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
<Extension()>
Public Function AllAsync(Of TSource) (source As IAsyncEnumerable(Of TSource), predicate As Func(Of TSource, Boolean), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Boolean)
Type Parameters
TSource
The type of the elements of source.
Parameters
predicate
A function to test each element for a condition.
Returns
true
if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false
.
Exceptions
Applies to
AllAsync(IAsyncEnumerable, Func<TSource,CancellationToken,ValueTask>, CancellationToken)
Source:
Determines whether all elements of a sequence satisfy a condition.
public static System.Threading.Tasks.ValueTask<bool> AllAsync<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<bool>> predicate, System.Threading.CancellationToken cancellationToken = default);
static member AllAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<bool>> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
<Extension()>
Public Function AllAsync(Of TSource) (source As IAsyncEnumerable(Of TSource), predicate As Func(Of TSource, CancellationToken, ValueTask(Of Boolean)), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Boolean)
Type Parameters
TSource
The type of the elements of source.
Parameters
Returns
true
if every element of the source sequence passes the test in the specified predicate, or if the sequence is empty; otherwise, false
.