AsyncEnumerable.AggregateBy Methode

Definitie

Overloads

Name Description
AggregateBy<TSource,TKey,TAccumulate>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,TAccumulate>, Func<TAccumulate, TSource,TAccumulate>, IEqualityComparer<TKey>)

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

AggregateBy<TSource,TKey,TAccumulate>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

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

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

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

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

AggregateBy<TSource,TKey,TAccumulate>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,TAccumulate>, Func<TAccumulate, TSource,TAccumulate>, IEqualityComparer<TKey>)

Bron:
AggregateBy.cs
Bron:
AggregateBy.cs
Bron:
AggregateBy.cs

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

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

Type parameters

TSource

Het type van de elementen van source.

TKey

Het type sleutel dat wordt geretourneerd door keySelector.

TAccumulate

Het type accumulatorwaarde.

Parameters

source
IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> om samen te voegen.

keySelector
Func<TSource,TKey>

Een functie om de sleutel voor elk element te extraheren.

seedSelector
Func<TKey,TAccumulate>

Een fabriek voor de initiële accumulatorwaarde.

func
Func<TAccumulate,TSource,TAccumulate>

Een accumulatorfunctie die op elk element moet worden aangeroepen.

keyComparer
IEqualityComparer<TKey>

Een IEqualityComparer<T> om sleutels te vergelijken met.

Retouren

IAsyncEnumerable<KeyValuePair<TKey,TAccumulate>>

Een opsomming die de aggregaties bevat die overeenkomen met elke sleutel die is afgeleid van source.

Uitzonderingen

func is null.

Opmerkingen

Deze methode is vergelijkbaar met de GroupBy-methoden waarbij elke groepering wordt samengevoegd in één waarde in plaats van een verzameling toe te wijzen voor elke groep.

Van toepassing op

AggregateBy<TSource,TKey,TAccumulate>(IAsyncEnumerable<TSource>, Func<TSource,TKey>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, IEqualityComparer<TKey>)

Bron:
AggregateBy.cs
Bron:
AggregateBy.cs
Bron:
AggregateBy.cs

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

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

Type parameters

TSource

Het type van de elementen van source.

TKey

Het type sleutel dat wordt geretourneerd door keySelector.

TAccumulate

Het type accumulatorwaarde.

Parameters

source
IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> om samen te voegen.

keySelector
Func<TSource,TKey>

Een functie om de sleutel voor elk element te extraheren.

seed
TAccumulate

De initiële accumulatorwaarde.

func
Func<TAccumulate,TSource,TAccumulate>

Een accumulatorfunctie die op elk element moet worden aangeroepen.

keyComparer
IEqualityComparer<TKey>

Een IEqualityComparer<T> om sleutels te vergelijken met.

Retouren

IAsyncEnumerable<KeyValuePair<TKey,TAccumulate>>

Een opsomming die de aggregaties bevat die overeenkomen met elke sleutel die is afgeleid van source.

Uitzonderingen

func is null.

Opmerkingen

Deze methode is vergelijkbaar met de GroupBy-methoden waarbij elke groepering wordt samengevoegd in één waarde in plaats van een verzameling toe te wijzen voor elke groep.

Van toepassing op

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

Bron:
AggregateBy.cs
Bron:
AggregateBy.cs
Bron:
AggregateBy.cs

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

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

Type parameters

TSource

Het type van de elementen van source.

TKey

Het type sleutel dat wordt geretourneerd door keySelector.

TAccumulate

Het type accumulatorwaarde.

Parameters

source
IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> om samen te voegen.

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

Een functie om de sleutel voor elk element te extraheren.

seedSelector
Func<TKey,CancellationToken,ValueTask<TAccumulate>>

Een fabriek voor de initiële accumulatorwaarde.

func
Func<TAccumulate,TSource,CancellationToken,ValueTask<TAccumulate>>

Een accumulatorfunctie die op elk element moet worden aangeroepen.

keyComparer
IEqualityComparer<TKey>

Een IEqualityComparer<T> om sleutels te vergelijken met.

Retouren

IAsyncEnumerable<KeyValuePair<TKey,TAccumulate>>

Een opsomming die de aggregaties bevat die overeenkomen met elke sleutel die is afgeleid van source.

Uitzonderingen

func is null.

Opmerkingen

Deze methode is vergelijkbaar met de GroupBy-methoden waarbij elke groepering wordt samengevoegd in één waarde in plaats van een verzameling toe te wijzen voor elke groep.

Van toepassing op

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

Bron:
AggregateBy.cs
Bron:
AggregateBy.cs
Bron:
AggregateBy.cs

Hiermee past u een accumulatorfunctie toe op een reeks, waarbij resultaten op sleutel worden gegroepeerd.

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

Type parameters

TSource

Het type van de elementen van source.

TKey

Het type sleutel dat wordt geretourneerd door keySelector.

TAccumulate

Het type accumulatorwaarde.

Parameters

source
IAsyncEnumerable<TSource>

Een IAsyncEnumerable<T> om samen te voegen.

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

Een functie om de sleutel voor elk element te extraheren.

seed
TAccumulate

De initiële accumulatorwaarde.

func
Func<TAccumulate,TSource,CancellationToken,ValueTask<TAccumulate>>

Een accumulatorfunctie die op elk element moet worden aangeroepen.

keyComparer
IEqualityComparer<TKey>

Een IEqualityComparer<T> om sleutels te vergelijken met.

Retouren

IAsyncEnumerable<KeyValuePair<TKey,TAccumulate>>

Een opsomming die de aggregaties bevat die overeenkomen met elke sleutel die is afgeleid van source.

Uitzonderingen

func is null.

Opmerkingen

Deze methode is vergelijkbaar met de GroupBy-methoden waarbij elke groepering wordt samengevoegd in één waarde in plaats van een verzameling toe te wijzen voor elke groep.

Van toepassing op