Table of Contents

Class BindableFactory

Namespace
SodaFlow.Bindable.ObjectModel
Assembly
SodaFlow.Bindable.ObjectModel.dll

The default IBindableFactory. It holds one scheduler and gives that scheduler to each object that it creates. Thus, a view model can take the factory through its constructor, and a test can supply Immediate without a copy of the true scheduler.

[PublicAPI]
public class BindableFactory : IBindableFactory
Inheritance
BindableFactory
Implements
Inherited Members
Extension Methods

Constructors

BindableFactory(IBindingScheduler)

Creates an instance that builds bindable objects with the given scheduler.

Methods

CreateBindableAction(StreamSink<Unit>, Cell<bool>?)

Shows a sink that exists as a command with no parameter. Use this when you build the graph on the sink and then attach the command to it.

CreateBindableAction<T>(StreamSink<Maybe<T>>, Cell<bool>?)

Shows a sink that exists as a command with an optional parameter. The CommandParameter can be null, an object of type T, or a Maybe<T>.

CreateBindableAction<T>(StreamSink<T>, Cell<bool>?)

Shows a sink that exists as a command that carries its CommandParameter.

CreateOneWayToSource<T>(CellSink<T>, IEqualityComparer<T>?)

Creates a one-way-to-source bindable property with an initial value, and sends the writes of the view into sink.

CreateOneWayToSource<T>(StreamSink<T>, T, IEqualityComparer<T>?)

Creates a one-way-to-source bindable property with an initial value, and sends the writes of the view into editsStreamSink.

CreateOneWay<T>(Cell<T>, IEqualityComparer<T>?)

Shows a cell as a bindable property that a caller cannot write.

CreateTwoWay<T>(CellSink<T>, IEqualityComparer<T>?)

Shows a cell sink as a two-way bindable property. This is the simplest condition. The view is the only writer, and the sink holds the value that is the authority.

CreateTwoWay<T>(Cell<T>, StreamSink<T>, IEqualityComparer<T>?)

Shows a cell as a two-way bindable property, and sends the writes of the view into editsStreamSink.