AsyncEnumerable.CountBy Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Overloads
| Name | Description |
|---|---|
| CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>) |
Retourneert het aantal elementen in de bronreeks gegroepeerd op sleutel. |
| CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
Retourneert het aantal elementen in de bronreeks gegroepeerd op sleutel. |
CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,CancellationToken,ValueTask<TKey>>, IEqualityComparer<TKey>)
- Bron:
- CountBy.cs
- Bron:
- CountBy.cs
- Bron:
- CountBy.cs
Retourneert het aantal elementen in de bronreeks gegroepeerd op sleutel.
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))
Type parameters
- TSource
Het type elementen van source.
- TKey
Het type sleutel dat wordt geretourneerd door keySelector.
Parameters
- source
- IAsyncEnumerable<TSource>
Een reeks die elementen bevat die moeten worden geteld.
- keySelector
- Func<TSource,CancellationToken,ValueTask<TKey>>
Een functie om de sleutel voor elk element te extraheren.
- keyComparer
- IEqualityComparer<TKey>
Een IEqualityComparer<T> om sleutels te vergelijken met.
Retouren
Een opsomming die de frequenties bevat van elke sleutel die voorkomt in source.
Uitzonderingen
keySelector is null.
Van toepassing op
CountBy<TSource,TKey>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)
- Bron:
- CountBy.cs
- Bron:
- CountBy.cs
- Bron:
- CountBy.cs
Retourneert het aantal elementen in de bronreeks gegroepeerd op sleutel.
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))
Type parameters
- TSource
Het type elementen van source.
- TKey
Het type sleutel dat wordt geretourneerd door keySelector.
Parameters
- source
- IAsyncEnumerable<TSource>
Een reeks die elementen bevat die moeten worden geteld.
- keySelector
- Func<TSource,TKey>
Een functie om de sleutel voor elk element te extraheren.
- keyComparer
- IEqualityComparer<TKey>
Een IEqualityComparer<T> om sleutels te vergelijken met.
Retouren
Een opsomming die de frequenties bevat van elke sleutel die voorkomt in source.
Uitzonderingen
keySelector is null.