Bewerken

Delen via


IOrderedAsyncEnumerable<TElement>.CreateOrderedAsyncEnumerable Method

Definition

Overloads

CreateOrderedAsyncEnumerable<TKey>(Func<TElement,CancellationToken,ValueTask<TKey>>, IComparer<TKey>, Boolean)

Performs a subsequent ordering on the elements of an IOrderedAsyncEnumerable<TElement> according to a key.

CreateOrderedAsyncEnumerable<TKey>(Func<TElement,TKey>, IComparer<TKey>, Boolean)

Performs a subsequent ordering on the elements of an IOrderedAsyncEnumerable<TElement> according to a key.

CreateOrderedAsyncEnumerable<TKey>(Func<TElement,CancellationToken,ValueTask<TKey>>, IComparer<TKey>, Boolean)

Source:
OfType.cs

Performs a subsequent ordering on the elements of an IOrderedAsyncEnumerable<TElement> according to a key.

public:
generic <typename TKey>
 System::Linq::IOrderedAsyncEnumerable<TElement> ^ CreateOrderedAsyncEnumerable(Func<TElement, System::Threading::CancellationToken, System::Threading::Tasks::ValueTask<TKey>> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer, bool descending);
public System.Linq.IOrderedAsyncEnumerable<out TElement> CreateOrderedAsyncEnumerable<TKey>(Func<out TElement,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> keySelector, System.Collections.Generic.IComparer<TKey>? comparer, bool descending);
abstract member CreateOrderedAsyncEnumerable : Func<'Element, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IComparer<'Key> * bool -> System.Linq.IOrderedAsyncEnumerable<'Element>
Public Function CreateOrderedAsyncEnumerable(Of TKey) (keySelector As Func(Of Out TElement, CancellationToken, ValueTask(Of TKey)), comparer As IComparer(Of TKey), descending As Boolean) As IOrderedAsyncEnumerable(Of Out TElement)

Type Parameters

TKey

The type of the key produced by keySelector.

Parameters

keySelector
Func<TElement,CancellationToken,ValueTask<TKey>>

The function used to extract the key for each element.

comparer
IComparer<TKey>

The IComparer<T> used to compare keys for placement in the returned sequence.

descending
Boolean

true to sort the elements in descending order; false to sort the elements in ascending order.

Returns

An IOrderedAsyncEnumerable<TElement> whose elements are sorted according to a key.

Applies to

CreateOrderedAsyncEnumerable<TKey>(Func<TElement,TKey>, IComparer<TKey>, Boolean)

Source:
OfType.cs

Performs a subsequent ordering on the elements of an IOrderedAsyncEnumerable<TElement> according to a key.

public:
generic <typename TKey>
 System::Linq::IOrderedAsyncEnumerable<TElement> ^ CreateOrderedAsyncEnumerable(Func<TElement, TKey> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer, bool descending);
public System.Linq.IOrderedAsyncEnumerable<out TElement> CreateOrderedAsyncEnumerable<TKey>(Func<out TElement,TKey> keySelector, System.Collections.Generic.IComparer<TKey>? comparer, bool descending);
abstract member CreateOrderedAsyncEnumerable : Func<'Element, 'Key> * System.Collections.Generic.IComparer<'Key> * bool -> System.Linq.IOrderedAsyncEnumerable<'Element>
Public Function CreateOrderedAsyncEnumerable(Of TKey) (keySelector As Func(Of Out TElement, TKey), comparer As IComparer(Of TKey), descending As Boolean) As IOrderedAsyncEnumerable(Of Out TElement)

Type Parameters

TKey

The type of the key produced by keySelector.

Parameters

keySelector
Func<TElement,TKey>

The function used to extract the key for each element.

comparer
IComparer<TKey>

The IComparer<T> used to compare keys for placement in the returned sequence.

descending
Boolean

true to sort the elements in descending order; false to sort the elements in ascending order.

Returns

An IOrderedAsyncEnumerable<TElement> whose elements are sorted according to a key.

Applies to