Język

AsyncEnumerable.CountBy Metoda

Definicja

Przeciążenia

Nazwa Opis
CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Zwraca liczbę elementów w sekwencji źródłowej pogrupowanej według klucza.

CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)

Zwraca liczbę elementów w sekwencji źródłowej pogrupowanej według klucza.

CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

Źródło:
CountBy.cs
Źródło:
CountBy.cs
Źródło:
CountBy.cs
Źródło:
CountBy.cs

Zwraca liczbę elementów w sekwencji źródłowej pogrupowanej według klucza.

public static System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.KeyValuePair<TKey,int>> CountBy<TSource,TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,TKey> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? keyComparer = default);
static member CountBy : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.KeyValuePair<'Key, int>>
<Extension()>
Public Function CountBy(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), Optional keyComparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of KeyValuePair(Of TKey, Integer))

Parametry typu

TSource

Typ elementów elementu source.

TKey

Typ klucza zwróconego przez keySelector.

Parametry

source
IAsyncEnumerable<TSource>

Sekwencja zawierająca elementy do zliczenia.

keySelector
Func<TSource,TKey>

Funkcja wyodrębniania klucza dla każdego elementu.

keyComparer
IEqualityComparer<TKey>

Element IEqualityComparer<T> do porównywania kluczy z.

Zwraca

Wyliczenie zawierające częstotliwości każdego wystąpienia klucza w programie source.

Wyjątki

Parametr keySelector ma wartość null.

Dotyczy

CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)

Źródło:
CountBy.cs
Źródło:
CountBy.cs
Źródło:
CountBy.cs
Źródło:
CountBy.cs

Zwraca liczbę elementów w sekwencji źródłowej pogrupowanej według klucza.

public static System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.KeyValuePair<TKey,int>> CountBy<TSource,TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TKey>> keySelector, System.Collections.Generic.IEqualityComparer<TKey>? keyComparer = default);
static member CountBy : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IEqualityComparer<'Key> -> System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.KeyValuePair<'Key, int>>
<Extension()>
Public Function CountBy(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, CancellationToken, ValueTask(Of TKey)), Optional keyComparer As IEqualityComparer(Of TKey) = Nothing) As IAsyncEnumerable(Of KeyValuePair(Of TKey, Integer))

Parametry typu

TSource

Typ elementów elementu source.

TKey

Typ klucza zwróconego przez keySelector.

Parametry

source
IAsyncEnumerable<TSource>

Sekwencja zawierająca elementy do zliczenia.

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

Funkcja wyodrębniania klucza dla każdego elementu.

keyComparer
IEqualityComparer<TKey>

Element IEqualityComparer<T> do porównywania kluczy z.

Zwraca

Wyliczenie zawierające częstotliwości każdego wystąpienia klucza w programie source.

Wyjątki

Parametr keySelector ma wartość null.

Dotyczy