Method ThenBy
ThenBy<T, TKey>(IOrderedAsyncEnumerable<T>, Func<T, TKey>, OrderByDirection)
Performs a subsequent ordering of elements in a sequence in a particular direction (ascending, descending) according to a key
Declaration
public static IOrderedAsyncEnumerable<T> ThenBy<T, TKey>(this IOrderedAsyncEnumerable<T> source, Func<T, TKey> keySelector, OrderByDirection direction)
Parameters
Type | Name | Description |
---|---|---|
IOrdered |
source | The sequence to order |
Func<T, TKey> | keySelector | A key selector function |
Order |
direction | A direction in which to order the elements (ascending, descending) |
Returns
Type | Description |
---|---|
IOrdered |
An ordered copy of the source sequence |
Type Parameters
Name | Description |
---|---|
T | The type of the elements in the source sequence |
TKey | The type of the key used to order elements |
ThenBy<T, TKey>(IOrderedAsyncEnumerable<T>, Func<T, TKey>, IComparer<TKey>, OrderByDirection)
Performs a subsequent ordering of elements in a sequence in a particular direction (ascending, descending) according to a key
Declaration
public static IOrderedAsyncEnumerable<T> ThenBy<T, TKey>(this IOrderedAsyncEnumerable<T> source, Func<T, TKey> keySelector, IComparer<TKey> comparer, OrderByDirection direction)
Parameters
Type | Name | Description |
---|---|---|
IOrdered |
source | The sequence to order |
Func<T, TKey> | keySelector | A key selector function |
IComparer<TKey> | comparer | A comparer used to define the semantics of element comparison |
Order |
direction | A direction in which to order the elements (ascending, descending) |
Returns
Type | Description |
---|---|
IOrdered |
An ordered copy of the source sequence |
Type Parameters
Name | Description |
---|---|
T | The type of the elements in the source sequence |
TKey | The type of the key used to order elements |