Table of Contents

Class Sum

Namespace
Bonsai.Reactive
Assembly
Bonsai.Core.dll

Represents an operator that computes the sum of an observable sequence.

Marble diagram

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.

[Combinator]
public class Sum
Inheritance
Sum
Inherited Members

Methods

Process(IObservable<decimal>)

Computes the sum of a sequence of decimal values.

public IObservable<decimal> Process(IObservable<decimal> source)

Parameters

source IObservable<decimal>

A sequence of decimal values to calculate the sum of.

Returns

IObservable<decimal>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<double>)

Computes the sum of a sequence of double values.

public IObservable<double> Process(IObservable<double> source)

Parameters

source IObservable<double>

A sequence of double values to calculate the sum of.

Returns

IObservable<double>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<int>)

Computes the sum of a sequence of int values.

public IObservable<int> Process(IObservable<int> source)

Parameters

source IObservable<int>

A sequence of int values to calculate the sum of.

Returns

IObservable<int>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<long>)

Computes the sum of a sequence of long values.

public IObservable<long> Process(IObservable<long> source)

Parameters

source IObservable<long>

A sequence of long values to calculate the sum of.

Returns

IObservable<long>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<decimal?>)

Computes the sum of a sequence of nullable decimal values.

public IObservable<decimal?> Process(IObservable<decimal?> source)

Parameters

source IObservable<decimal?>

A sequence of nullable decimal values to calculate the sum of.

Returns

IObservable<decimal?>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<double?>)

Computes the sum of a sequence of nullable double values.

public IObservable<double?> Process(IObservable<double?> source)

Parameters

source IObservable<double?>

A sequence of nullable double values to calculate the sum of.

Returns

IObservable<double?>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<int?>)

Computes the sum of a sequence of nullable int values.

public IObservable<int?> Process(IObservable<int?> source)

Parameters

source IObservable<int?>

A sequence of nullable int values to calculate the sum of.

Returns

IObservable<int?>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<long?>)

Computes the sum of a sequence of nullable long values.

public IObservable<long?> Process(IObservable<long?> source)

Parameters

source IObservable<long?>

A sequence of nullable long values to calculate the sum of.

Returns

IObservable<long?>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<float?>)

Computes the sum of a sequence of nullable float values.

public IObservable<float?> Process(IObservable<float?> source)

Parameters

source IObservable<float?>

A sequence of nullable float values to calculate the sum of.

Returns

IObservable<float?>

An observable sequence containing a single element representing the sum of the values in the source sequence.

Process(IObservable<float>)

Computes the sum of a sequence of float values.

public IObservable<float> Process(IObservable<float> source)

Parameters

source IObservable<float>

A sequence of float values to calculate the sum of.

Returns

IObservable<float>

An observable sequence containing a single element representing the sum of the values in the source sequence.