AsyncEnumerable.AggregateAsync Methode

Definition

Überlädt

Name Beschreibung
AggregateAsync<TSource,TAccumulate,TResult>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,CancellationToken,ValueTask<TAccumulate>>, Func<TAccumulate,CancellationToken,ValueTask<TResult>>, CancellationToken)

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet, und die angegebene Funktion wird verwendet, um den Ergebniswert auszuwählen.

AggregateAsync<TSource,TAccumulate,TResult>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate, TResult>, CancellationToken)

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet, und die angegebene Funktion wird verwendet, um den Ergebniswert auszuwählen.

AggregateAsync<TSource,TAccumulate>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,CancellationToken,ValueTask<TAccumulate>>, CancellationToken)

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet.

AggregateAsync<TSource,TAccumulate>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, CancellationToken)

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet.

AggregateAsync<TSource>(IAsyncEnumerable<TSource>, Func<TSource,TSource,CancellationToken,ValueTask<TSource>>, CancellationToken)

Wendet eine Akkumulatorfunktion auf eine Sequenz an.

AggregateAsync<TSource>(IAsyncEnumerable<TSource>, Func<TSource,TSource,TSource>, CancellationToken)

Wendet eine Akkumulatorfunktion auf eine Sequenz an.

AggregateAsync<TSource,TAccumulate,TResult>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,CancellationToken,ValueTask<TAccumulate>>, Func<TAccumulate,CancellationToken,ValueTask<TResult>>, CancellationToken)

Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet, und die angegebene Funktion wird verwendet, um den Ergebniswert auszuwählen.

public static System.Threading.Tasks.ValueTask<TResult> AggregateAsync<TSource,TAccumulate,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate,TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TAccumulate>> func, Func<TAccumulate,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TResult>> resultSelector, System.Threading.CancellationToken cancellationToken = default);
static member AggregateAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * 'Accumulate * Func<'Accumulate, 'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Accumulate>> * Func<'Accumulate, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Result>> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Result>
<Extension()>
Public Function AggregateAsync(Of TSource, TAccumulate, TResult) (source As IAsyncEnumerable(Of TSource), seed As TAccumulate, func As Func(Of TAccumulate, TSource, CancellationToken, ValueTask(Of TAccumulate)), resultSelector As Func(Of TAccumulate, CancellationToken, ValueTask(Of TResult)), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TResult)

Typparameter

TSource

Der Typ der Quellelemente.

TAccumulate

Der Typ des Akkumulatorwerts.

TResult

Der Typ des resultierenden Werts.

Parameter

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> , um zu aggregieren.

seed
TAccumulate

Der anfängliche Akkumulatorwert.

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

Eine Akkumulatorfunktion, die für jedes Element aufgerufen werden soll.

resultSelector
Func<TAccumulate,CancellationToken,ValueTask<TResult>>

Eine Funktion zum Umwandeln des endgültigen Akkumulatorwerts in den Ergebniswert.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen. Der Standardwert lautet None.

Gibt zurück

Der transformierte endgültige Akkumulatorwert.

Ausnahmen

resultSelector ist null.

Gilt für:

AggregateAsync<TSource,TAccumulate,TResult>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate, TResult>, CancellationToken)

Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet, und die angegebene Funktion wird verwendet, um den Ergebniswert auszuwählen.

public static System.Threading.Tasks.ValueTask<TResult> AggregateAsync<TSource,TAccumulate,TResult>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, TAccumulate seed, Func<TAccumulate,TSource,TAccumulate> func, Func<TAccumulate,TResult> resultSelector, System.Threading.CancellationToken cancellationToken = default);
static member AggregateAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * 'Accumulate * Func<'Accumulate, 'Source, 'Accumulate> * Func<'Accumulate, 'Result> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Result>
<Extension()>
Public Function AggregateAsync(Of TSource, TAccumulate, TResult) (source As IAsyncEnumerable(Of TSource), seed As TAccumulate, func As Func(Of TAccumulate, TSource, TAccumulate), resultSelector As Func(Of TAccumulate, TResult), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TResult)

Typparameter

TSource

Der Typ der Quellelemente.

TAccumulate

Der Typ des Akkumulatorwerts.

TResult

Der Typ des resultierenden Werts.

Parameter

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> , um zu aggregieren.

seed
TAccumulate

Der anfängliche Akkumulatorwert.

func
Func<TAccumulate,TSource,TAccumulate>

Eine Akkumulatorfunktion, die für jedes Element aufgerufen werden soll.

resultSelector
Func<TAccumulate,TResult>

Eine Funktion zum Umwandeln des endgültigen Akkumulatorwerts in den Ergebniswert.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen. Der Standardwert lautet None.

Gibt zurück

Der transformierte endgültige Akkumulatorwert.

Ausnahmen

resultSelector ist null.

Gilt für:

AggregateAsync<TSource,TAccumulate>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,CancellationToken,ValueTask<TAccumulate>>, CancellationToken)

Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet.

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

Typparameter

TSource

Der Typ der Quellelemente.

TAccumulate

Der Typ des Akkumulatorwerts.

Parameter

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> , um zu aggregieren.

seed
TAccumulate

Der anfängliche Akkumulatorwert.

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

Eine Akkumulatorfunktion, die für jedes Element aufgerufen werden soll.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen. Der Standardwert lautet None.

Gibt zurück

ValueTask<TAccumulate>

Der endgültige Akkumulatorwert.

Ausnahmen

func ist null.

Gilt für:

AggregateAsync<TSource,TAccumulate>(IAsyncEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, CancellationToken)

Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs

Wendet eine Akkumulatorfunktion auf eine Sequenz an. Der angegebene Ausgangswert wird als anfänglicher Akkumulatorwert verwendet.

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

Typparameter

TSource

Der Typ der Quellelemente.

TAccumulate

Der Typ des Akkumulatorwerts.

Parameter

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> , um zu aggregieren.

seed
TAccumulate

Der anfängliche Akkumulatorwert.

func
Func<TAccumulate,TSource,TAccumulate>

Eine Akkumulatorfunktion, die für jedes Element aufgerufen werden soll.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen. Der Standardwert lautet None.

Gibt zurück

ValueTask<TAccumulate>

Der endgültige Akkumulatorwert.

Ausnahmen

func ist null.

Gilt für:

AggregateAsync<TSource>(IAsyncEnumerable<TSource>, Func<TSource,TSource,CancellationToken,ValueTask<TSource>>, CancellationToken)

Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs

Wendet eine Akkumulatorfunktion auf eine Sequenz an.

public static System.Threading.Tasks.ValueTask<TSource> AggregateAsync<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,TSource,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<TSource>> func, System.Threading.CancellationToken cancellationToken = default);
static member AggregateAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Source>> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Source>
<Extension()>
Public Function AggregateAsync(Of TSource) (source As IAsyncEnumerable(Of TSource), func As Func(Of TSource, TSource, CancellationToken, ValueTask(Of TSource)), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TSource)

Typparameter

TSource

Der Typ der Quellelemente.

Parameter

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> , um zu aggregieren.

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

Eine Akkumulatorfunktion, die für jedes Element aufgerufen werden soll.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen. Der Standardwert lautet None.

Gibt zurück

ValueTask<TSource>

Der endgültige Akkumulatorwert.

Ausnahmen

func ist null.

source enthält keine Elemente.

Gilt für:

AggregateAsync<TSource>(IAsyncEnumerable<TSource>, Func<TSource,TSource,TSource>, CancellationToken)

Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs
Quelle:
AggregateAsync.cs

Wendet eine Akkumulatorfunktion auf eine Sequenz an.

public static System.Threading.Tasks.ValueTask<TSource> AggregateAsync<TSource>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, Func<TSource,TSource,TSource> func, System.Threading.CancellationToken cancellationToken = default);
static member AggregateAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Source, 'Source> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Source>
<Extension()>
Public Function AggregateAsync(Of TSource) (source As IAsyncEnumerable(Of TSource), func As Func(Of TSource, TSource, TSource), Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TSource)

Typparameter

TSource

Der Typ der Quellelemente.

Parameter

source
IAsyncEnumerable<TSource>

An IAsyncEnumerable<T> , um zu aggregieren.

func
Func<TSource,TSource,TSource>

Eine Akkumulatorfunktion, die für jedes Element aufgerufen werden soll.

cancellationToken
CancellationToken

Der CancellationToken zu überwachende Monitor für Abbruchanforderungen. Der Standardwert lautet None.

Gibt zurück

ValueTask<TSource>

Der endgültige Akkumulatorwert.

Ausnahmen

func ist null.

source enthält keine Elemente.

Gilt für: