Gjallarhorn.Bindable


Bind

Namespace: Gjallarhorn.Bindable

Functions to work with binding sources

Nested types and modules

ModuleDescription
Collections

Submodule providing API for explicit binding generation of collections

Explicit

Submodule providing API for explicit binding generation from names and signals instead of model/viewmodel

Implementation

Internal module used to manage the actual construction of binding sources

Functions and values

Function or valueDescription
cmd name nav source _signal
Signature: name:Expr<VmCmd<'Msg>> -> nav:Dispatch<'Nav> -> source:BindingSource -> _signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Msg

Creates an ICommand (one way property) to a binding source by name which outputs a specific message

cmdIf canExecute name nav source signal
Signature: canExecute:('Model -> bool) -> name:Expr<VmCmd<'Msg>> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Msg

Creates an ICommand (one way property) to a binding source by name which outputs a specific message

cmdParam setter name nav source _signal
Signature: setter:('Param -> 'Msg) -> name:Expr<VmCmd<'Msg>> -> nav:Dispatch<'Nav> -> source:BindingSource -> _signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Param, 'Msg

Creates a parameterized ICommand (one way property) to a binding source by name which outputs a specific message

cmdParamIf (...)
Signature: canExecute:('Model -> bool) -> setter:('Param -> 'Msg) -> name:Expr<VmCmd<'Msg>> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Param, 'Msg

Creates a parameterized ICommand (one way property) to a binding source by name which outputs a specific message

collection (...)
Signature: getter:('Model -> 'SubmodelCollection) -> collectionVm:IComponent<'Submodel,'Nav,'Submsg> -> mapper:('Submsg * 'Submodel -> 'Msg) -> name:Expr<'SubmodelCollection> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Msg, 'Submodel, 'SubmodelCollection, 'Submsg

Bind a collection as a one-way property, acting as a reducer for messages from the individual components of the collection

comp (...)
Signature: getter:('Model -> 'Submodel) -> componentVm:IComponent<'Submodel,'Nav,'Submsg> -> mapper:('Submsg * 'Submodel -> 'Msg) -> name:Expr<'Submodel> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Msg, 'Submodel, 'Submsg

Bind a component as a two-way property, acting as a reducer for messages from the component

createObservableSource ()
Signature: unit -> ObservableBindingSource<'a>
Type parameters: 'a

Create a binding subject for the installed platform

createSource ()
Signature: unit -> BindingSource

Create a binding source for the installed platform

oneWay getter name nav source signal
Signature: getter:('Model -> 'Prop) -> name:Expr<'Prop> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Prop, 'Msg

Add a watched signal (one way property) to a binding source by name

oneWayValidated (...)
Signature: getter:('Model -> 'Prop) -> validation:Validation<'Prop,'Prop> -> name:Expr<'Prop> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Prop, 'Msg

Add a watched signal (one way validated property) to a binding source by name

self name nav source signal
Signature: name:Expr<ISignal<'Model>> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Msg

Add a watched signal that is our entire model to a binding source by name

toExplicit nav source model list
Signature: nav:Dispatch<'Nav> -> source:BindingSource -> model:ISignal<'Model> -> list:(Dispatch<'Nav> -> BindingSource -> ISignal<'Model> -> IObservable<'Msg> option) list -> IObservable<'Msg> list
Type parameters: 'Model, 'Nav, 'Msg

Convert from new API to explicit form

toNav navBinding nav source signal
Signature: navBinding:(Dispatch<'Nav> -> BindingSource -> ISignal<'Model> -> IObservable<'Nav> option) -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Msg

Creates an ICommand (one way property) to a binding source by name which outputs a specific message

twoWay (...)
Signature: getter:('Model -> 'Prop) -> setter:('Prop -> 'Msg) -> name:Expr<'Prop> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Prop, 'Msg

Add a two way property to a binding source by name

twoWayValidated (...)
Signature: getter:('Model -> 'Prop) -> validation:Validation<'Prop,'Prop> -> setter:('Prop -> 'Msg) -> name:Expr<'Prop> -> nav:Dispatch<'Nav> -> source:BindingSource -> signal:ISignal<'Model> -> IObservable<'Msg> option
Type parameters: 'Model, 'Nav, 'Prop, 'Msg

Add a two way property to a binding source by name

Fork me on GitHub