Constant sources

Location: main sources module.

A constant source returns a preconfigured settings node and never issues any updates.

var source = new ConstantSource(new ValueNode("value"));

A lazy constant source does the same but defers the node acquisition until first subscription:

var source = new LazyConstantSource(() => new ValueNode("value"));

Errors in the provided delegate are propagated via (null, error) notification. It's guaranteed to execute not more than once.

Practical use

Constant sources are handy for unit testing and may serve as base classes for custom sources.

Last updated