Logo MVUish.Avalonia

Program<'Arg, 'Model, 'Msg, 'View> Type

The Program type that holds the configuration of the MVU app.

Record fields

Record Field Description

Dispatcher

Full Usage: Dispatcher

Field type: IDispatcher option

The dispatcher the update loop posts to, as an IDispatcher. None captures Dispatcher.UIThread once when the program starts, so the loop keeps one dispatcher for its lifetime even when the process global is later replaced; Some binds one explicitly — a headless test session's dispatcher, or any test fake implementing IDispatcher.

Field type: IDispatcher option

Init

Full Usage: Init

Field type: 'Arg -> 'Model * Cmd<'Msg>
Field type: 'Arg -> 'Model * Cmd<'Msg>

OnError

Full Usage: OnError

Field type: string * exn -> unit
Field type: string * exn -> unit

Subscribe

Full Usage: Subscribe

Field type: 'Model -> Sub<'Msg>
Field type: 'Model -> Sub<'Msg>

Termination

Full Usage: Termination

Field type: ('Msg -> bool) * ('Model -> unit)

A message matching the predicate terminates the program: all subscriptions stop, the model stream completes, and the handler runs with the final model.

Field type: ('Msg -> bool) * ('Model -> unit)

Update

Full Usage: Update

Field type: 'Msg -> 'Model -> 'Model * Cmd<'Msg>
Field type: 'Msg -> 'Model -> 'Model * Cmd<'Msg>

View

Full Usage: View

Field type: IObservable<'Model> -> Dispatch<'Msg> -> 'View
Field type: IObservable<'Model> -> Dispatch<'Msg> -> 'View

Type something to start searching.