Ανάγνωση στα Αγγλικά Επεξεργασία

Κοινή χρήση μέσω


AsyncEnumerable.Select Method

Definition

Overloads

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<TResult>>)

Projects each element of a sequence into a new form by incorporating the element's index.

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,TResult>)

Projects each element of a sequence into a new form by incorporating the element's index.

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TResult>>)

Projects each element of a sequence into a new form.

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,TResult>)

Projects each element of a sequence into a new form.

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,CancellationToken,ValueTask<TResult>>)

Source:
Select.cs

Projects each element of a sequence into a new form by incorporating the element's index.

public static System.Collections.Generic.IAsyncEnumerable<TResult> Select<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> selector);

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the value returned by selector.

Parameters

source
IAsyncEnumerable<TSource>

A sequence of values to invoke a transform function on.

selector
Func<TSource,Int32,CancellationToken,ValueTask<TResult>>

A transform function to apply to each element; the second parameter of the function represents the index of the source element.

Returns

IAsyncEnumerable<TResult>

An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.

Exceptions

selector is null.

Applies to

.NET 10 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,Int32,TResult>)

Source:
Select.cs

Projects each element of a sequence into a new form by incorporating the element's index.

public static System.Collections.Generic.IAsyncEnumerable<TResult> Select<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,TResult> selector);

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the value returned by selector.

Parameters

source
IAsyncEnumerable<TSource>

A sequence of values to invoke a transform function on.

selector
Func<TSource,Int32,TResult>

A transform function to apply to each element; the second parameter of the function represents the index of the source element.

Returns

IAsyncEnumerable<TResult>

An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.

Exceptions

selector is null.

Applies to

.NET 10 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TResult>>)

Source:
Select.cs

Projects each element of a sequence into a new form.

public static System.Collections.Generic.IAsyncEnumerable<TResult> Select<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> selector);

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the value returned by selector.

Parameters

source
IAsyncEnumerable<TSource>

A sequence of values to invoke a transform function on.

selector
Func<TSource,CancellationToken,ValueTask<TResult>>

A transform function to apply to each element.

Returns

IAsyncEnumerable<TResult>

An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.

Exceptions

selector is null.

Applies to

.NET 10 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,TResult>)

Source:
Select.cs

Projects each element of a sequence into a new form.

public static System.Collections.Generic.IAsyncEnumerable<TResult> Select<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,TResult> selector);

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the value returned by selector.

Parameters

source
IAsyncEnumerable<TSource>

A sequence of values to invoke a transform function on.

selector
Func<TSource,TResult>

A transform function to apply to each element.

Returns

IAsyncEnumerable<TResult>

An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.

Exceptions

selector is null.

Applies to

.NET 10 και άλλες εκδόσεις
Προϊόν Εκδόσεις
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided), 10
.NET Standard 2.0 (package-provided)