AsyncEnumerable.Select Method
Definition
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
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:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Select(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TResult>> ^ selector);
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);
static member Select : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Select(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, Integer, CancellationToken, ValueTask(Of TResult))) As IAsyncEnumerable(Of TResult)
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
An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.
Exceptions
selector
is null
.
Applies to
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:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Select(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, int, TResult> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> Select<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,int,TResult> selector);
static member Select : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, int, 'Result> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Select(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, Integer, TResult)) As IAsyncEnumerable(Of TResult)
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.
A transform function to apply to each element; the second parameter of the function represents the index of the source element.
Returns
An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.
Exceptions
selector
is null
.
Applies to
Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TResult>>)
- Source:
- Select.cs
Projects each element of a sequence into a new form.
public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Select(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TResult>> ^ selector);
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);
static member Select : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Select(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, CancellationToken, ValueTask(Of TResult))) As IAsyncEnumerable(Of TResult)
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
An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.
Exceptions
selector
is null
.
Applies to
Select<TSource,TResult>(IAsyncEnumerable<TSource>, Func<TSource,TResult>)
- Source:
- Select.cs
Projects each element of a sequence into a new form.
public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IAsyncEnumerable<TResult> ^ Select(System::Collections::Generic::IAsyncEnumerable<TSource> ^ source, Func<TSource, TResult> ^ selector);
public static System.Collections.Generic.IAsyncEnumerable<TResult> Select<TSource,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,TResult> selector);
static member Select : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Result> -> System.Collections.Generic.IAsyncEnumerable<'Result>
<Extension()>
Public Function Select(Of TSource, TResult) (source As IAsyncEnumerable(Of TSource), selector As Func(Of TSource, TResult)) As IAsyncEnumerable(Of TResult)
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
An IAsyncEnumerable<T> whose elements are the result of invoking the transform function on each element of source.
Exceptions
selector
is null
.