Class Sum
Represents an operator that computes the sum of an observable sequence.
The Sum operator collects all the numbers from the source sequence and emits a single value representing the sum of all numbers. The single result value is emitted only when the source sequence terminates successfully.
Examples
Use Sum to report the sum of all elements at the end of a sequence.
Related Operators
Use Accumulate instead to continuously track the running sum of values in the sequence.
[Combinator]
public class Sum
- Inheritance
-
Sum
- Inherited Members
Methods
- Process(IObservable<decimal>)
Computes the sum of a sequence of decimal values.
- Process(IObservable<double>)
Computes the sum of a sequence of double values.
- Process(IObservable<int>)
Computes the sum of a sequence of int values.
- Process(IObservable<long>)
Computes the sum of a sequence of long values.
- Process(IObservable<decimal?>)
Computes the sum of a sequence of nullable decimal values.
- Process(IObservable<double?>)
Computes the sum of a sequence of nullable double values.
- Process(IObservable<int?>)
Computes the sum of a sequence of nullable int values.
- Process(IObservable<long?>)
Computes the sum of a sequence of nullable long values.
- Process(IObservable<float?>)
Computes the sum of a sequence of nullable float values.
- Process(IObservable<float>)
Computes the sum of a sequence of float values.