Table of Contents

Interface IBindableFactory

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

Factory methods that give you a bindable. A caller can supply an IBindingScheduler through the constructor, thus a test can replace it.

[PublicAPI]
public interface IBindableFactory
Extension Methods

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.