Language

AsyncEnumerable.OrderBy Method

Definition

Overloads

Name Description
OrderBy(IAsyncEnumerable, Func>, IComparer)

Sorts the elements of a sequence in ascending order.

OrderBy(IAsyncEnumerable, Func, IComparer)

Sorts the elements of a sequence in ascending order.

OrderBy(IAsyncEnumerable, Func>, IComparer)

Source:
OrderBy.cs
Source:
OrderBy.cs
Source:
OrderBy.cs
Source:
OrderBy.cs

Sorts the elements of a sequence in ascending order.

public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, Func> keySelector, System.Collections.Generic.IComparer? comparer = default);
static member OrderBy : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IComparer<'Key> -> System.Linq.IOrderedAsyncEnumerable<'Source>

Public Function OrderBy(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, CancellationToken, ValueTask(Of TKey)), Optional comparer As IComparer(Of TKey) = Nothing) As IOrderedAsyncEnumerable(Of TSource)

Type Parameters

TSource

The type of the elements of source.

TKey

The type of the key returned by keySelector.

Parameters

source
IAsyncEnumerable

A sequence of values to order.

keySelector
FuncCancellationToken,ValueTask>

A function to extract a key from an element.

comparer
IComparer

An IComparer to compare keys.

Returns

An IAsyncEnumerable whose elements are sorted according to a key.

Exceptions

keySelector is null.

Applies to

OrderBy(IAsyncEnumerable, Func, IComparer)

Source:
OrderBy.cs
Source:
OrderBy.cs
Source:
OrderBy.cs
Source:
OrderBy.cs

Sorts the elements of a sequence in ascending order.

public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, Func keySelector, System.Collections.Generic.IComparer? comparer = default);
static member OrderBy : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IComparer<'Key> -> System.Linq.IOrderedAsyncEnumerable<'Source>

Public Function OrderBy(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), Optional comparer As IComparer(Of TKey) = Nothing) As IOrderedAsyncEnumerable(Of TSource)

Type Parameters

TSource

The type of the elements of source.

TKey

The type of the key returned by keySelector.

Parameters

source
IAsyncEnumerable

A sequence of values to order.

keySelector
Func

A function to extract a key from an element.

comparer
IComparer

An IComparer to compare keys.

Returns

An IAsyncEnumerable whose elements are sorted according to a key.

Exceptions

keySelector is null.

Applies to