| PersistentFSMBaseTState, TData, TEventStartWith Method |
Sets the initial state for this FSM. Call this method from the constructor before the
Initialize
method.
If different state is needed after a restart this method, followed by
Initialize, can be used in the
actor
life cycle hooks
PreStart and
PostRestart(Exception).
Namespace:
Akka.Persistence.Fsm
Assembly:
Akka.Persistence (in Akka.Persistence.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public void StartWith(
TState stateName,
TData stateData,
Nullable<TimeSpan> timeout = null
)
member StartWith :
stateName : 'TState *
stateData : 'TData *
?timeout : Nullable<TimeSpan>
(* Defaults:
let _timeout = defaultArg timeout null
*)
-> unit
Parameters
- stateName
- Type: TState
Initial state designator. - stateData
- Type: TData
Initial state data. - timeout (Optional)
- Type: SystemNullableTimeSpan
State timeout for the initial state, overriding the default timeout for that state.
See Also