AsyncEnumerable.ThenByDescending 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
ThenByDescending<TSource,TKey>(IOrderedAsyncEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>) |
Performs a subsequent ordering of the elements in a sequence in descending order. |
ThenByDescending<TSource,TKey>(IOrderedAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, IComparer<TKey>) |
Performs a subsequent ordering of the elements in a sequence in descending order. |
ThenByDescending<TSource,TKey>(IOrderedAsyncEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)
- Source:
- OrderBy.cs
Performs a subsequent ordering of the elements in a sequence in descending order.
public static System.Linq.IOrderedAsyncEnumerable<TSource> ThenByDescending<TSource,TKey>(this System.Linq.IOrderedAsyncEnumerable<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IComparer<TKey>? comparer = default);
static member ThenByDescending : System.Linq.IOrderedAsyncEnumerable<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IComparer<'Key> -> System.Linq.IOrderedAsyncEnumerable<'Source>
<Extension()>
Public Function ThenByDescending(Of TSource, TKey) (source As IOrderedAsyncEnumerable(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
- IOrderedAsyncEnumerable<TSource>
A sequence of values to order.
- keySelector
- Func<TSource,TKey>
A function to extract a key from each element.
- comparer
- IComparer<TKey>
An IComparer<T> to compare keys.
Returns
An IAsyncEnumerable<T> whose elements are sorted in descending order according to a key.
Exceptions
keySelector
is null
.
Applies to
ThenByDescending<TSource,TKey>(IOrderedAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, IComparer<TKey>)
- Source:
- OrderBy.cs
Performs a subsequent ordering of the elements in a sequence in descending order.
public static System.Linq.IOrderedAsyncEnumerable<TSource> ThenByDescending<TSource,TKey>(this System.Linq.IOrderedAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> keySelector, System.Collections.Generic.IComparer<TKey>? comparer = default);
static member ThenByDescending : System.Linq.IOrderedAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IComparer<'Key> -> System.Linq.IOrderedAsyncEnumerable<'Source>
<Extension()>
Public Function ThenByDescending(Of TSource, TKey) (source As IOrderedAsyncEnumerable(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
- IOrderedAsyncEnumerable<TSource>
A sequence of values to order.
- keySelector
- Func<TSource,CancellationToken,ValueTask<TKey>>
A function to extract a key from each element.
- comparer
- IComparer<TKey>
An IComparer<T> to compare keys.
Returns
An IAsyncEnumerable<T> whose elements are sorted in descending order according to a key.
Exceptions
keySelector
is null
.