StateMachine.Builder<'TState, 'TEvent, 'TEffect> Type
Declarative builder for constructing state machine definitions.
Constructors
| Constructor |
Description
|
|
Instance members
| Instance member |
Description
|
|
Build the state machine definition.
|
Full Usage:
this.EventTag
Parameters:
'TEvent -> int
|
Set the event tag extractor (discriminated union case index). Function that returns the tag for a given event.
|
Full Usage:
this.On
Parameters:
int
-
The state discriminator tag.
eTag : int
-
The event discriminator tag.
handler : 'TState -> 'TEvent -> Result<TransitionResult<'TState, 'TEffect>, string>
-
The transition handler function.
|
Add a transition handler for the given (stateTag, eventTag) pair. If the same pair is registered multiple times, only the last handler is kept.
|
Full Usage:
this.Otherwise
Parameters:
'TState -> 'TEvent -> string
|
Set the handler for transitions not in the map. Function that returns an error message for invalid transitions.
|
Full Usage:
this.StateTag
Parameters:
'TState -> int
|
Set the state tag extractor (discriminated union case index). Function that returns the tag for a given state.
|
TDesu.FSharp