<PackageReference Include="ReactiveUI.Primitives.Core" Version="10.0.0" />

ReactiveUI.Primitives.Advanced.ReduceWitness<TSource, TAccumulate>

public sealed class ReduceWitness<TSource, TAccumulate> : IObserver<TSource>, IDisposable
Sink that emits the final accumulation once the source completes.
public ReduceWitness(IObserver<TAccumulate> observer, TAccumulate seed, Func<TAccumulate, TSource, TAccumulate> accumulator)

Sink that emits the final accumulation once the source completes.

public void Dispose()

public void OnCompleted()

public void OnError(Exception error)

public void OnNext(TSource value)

public void SetSubscription(IDisposable subscription)

Assigns the upstream subscription, disposing the incoming one when this sink holds a subscription or has been disposed.