Class RowAggregation<TState>
A fold over rows expressed as three functions, for AggregateAsync<TState>(IExcelSheet, RowAggregation<TState>, SheetParallelOptions?, CancellationToken). Carries the same contract as IRowAccumulator<TSelf, TModel>, without requiring a type.
public sealed class RowAggregation<TState>
Type Parameters
TStateThe accumulator type. Each partition of the sheet owns one instance.
- Inheritance
-
RowAggregation<TState>
- Inherited Members
Properties
Accumulate
Gets the function that folds one row into its partition's accumulator. Runs concurrently on worker threads and must mutate only the accumulator it is given.
public required RowAction<TState> Accumulate { get; init; }
Property Value
- RowAction<TState>
Combine
Gets the function that folds the following partition's accumulator into the preceding one. Called on one thread, left to right in sheet order.
public required Func<TState, TState, TState> Combine { get; init; }
Property Value
- Func<TState, TState, TState>
Seed
Gets the function that creates an empty accumulator. Called once per partition, possibly more.
public required Func<TState> Seed { get; init; }
Property Value
- Func<TState>