'Declaration Public Overloads Shared Function LiveAggregate (Of TSource,TAccumulate,TResult)( _ ByVal source As View(Of TSource), _ ByVal seed As TAccumulate, _ ByVal funcAdd As Expression(Of Func(Of TAccumulate,TSource,TAccumulate)), _ ByVal funcRemove As Expression(Of Func(Of TAccumulate,TSource,TAccumulate)), _ ByVal funcRemoveDefined As Expression(Of Func(Of TAccumulate,TSource,Boolean)), _ ByVal resultSelector As Expression(Of Func(Of TAccumulate,TResult)) _ ) As AggregationView(Of TSource,TResult)
public static AggregationView<TSource,TResult> LiveAggregate<TSource,TAccumulate,TResult>( View<TSource> source, TAccumulate seed, Expression<Func<TAccumulate,TSource,TAccumulate>> funcAdd, Expression<Func<TAccumulate,TSource,TAccumulate>> funcRemove, Expression<Func<TAccumulate,TSource,bool>> funcRemoveDefined, Expression<Func<TAccumulate,TResult>> resultSelector )
Parameters
- source
- A view to aggregate over.
- seed
- The initial accumulator value.
- funcAdd
- An accumulator function to be invoked on each element that is added to the source view.
- funcRemove
- A function to be applied to the accumulated value and to an element to obtain the changed accumulated value, when an element is removed from the source view.
- funcRemoveDefined
- A function used to determine whether funcRemove must be applied when an element is removed from the source view, or the accumulated value is not affected by its removal.
- resultSelector
- A function to transform the final accumulator value into the result value.
Type Parameters
- TSource
- The type of the elements of source.
- TAccumulate
- The type of the accumulator value.
- TResult
- The type of the resulting value.
Return Value
A view representing the final accumulator value.