語言

AsyncEnumerable.Where 方法

定義

多載

名稱 Description
Where<TSource>(IAsyncEnumerable<TSource>, Func<TSource,Boolean>)

根據述詞篩選值序列。

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

根據述詞篩選值序列。 每個元素的索引都會用於述詞函式的邏輯中。

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

根據述詞篩選值序列。 每個元素的索引都會用於述詞函式的邏輯中。

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

根據述詞篩選值序列。

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

來源:
Where.cs
來源:
Where.cs
來源:
Where.cs

根據述詞篩選值序列。

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

類型參數

TSource

元素 source的類型。

參數

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> to filter。

predicate
Func<TSource,Boolean>

一個用來測試每個元素條件的函數。

傳回

IAsyncEnumerable<TSource>

一個 IAsyncEnumerable<T> 包含輸入序列中滿足條件的元素。

例外狀況

predicate 是 null。

適用於

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

來源:
Where.cs
來源:
Where.cs
來源:
Where.cs

根據述詞篩選值序列。 每個元素的索引都會用於述詞函式的邏輯中。

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

類型參數

TSource

元素 source的類型。

參數

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> to filter。

predicate
Func<TSource,Int32,Boolean>

一個用來測試每個元素條件的函數;函數的第二個參數代表來源元素的索引。

傳回

IAsyncEnumerable<TSource>

一個 IAsyncEnumerable<T> 包含輸入序列中滿足條件的元素。

例外狀況

predicate 是 null。

適用於

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

來源:
Where.cs
來源:
Where.cs
來源:
Where.cs

根據述詞篩選值序列。 每個元素的索引都會用於述詞函式的邏輯中。

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

類型參數

TSource

元素 source的類型。

參數

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> to filter。

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

一個用來測試每個元素條件的函數;函數的第二個參數代表來源元素的索引。

傳回

IAsyncEnumerable<TSource>

一個 IAsyncEnumerable<T> 包含輸入序列中滿足條件的元素。

例外狀況

predicate 是 null。

適用於

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

來源:
Where.cs
來源:
Where.cs
來源:
Where.cs

根據述詞篩選值序列。

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

類型參數

TSource

元素 source的類型。

參數

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> to filter。

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

一個用來測試每個元素條件的函數。

傳回

IAsyncEnumerable<TSource>

一個 IAsyncEnumerable<T> 包含輸入序列中滿足條件的元素。

例外狀況

predicate 是 null。

適用於