FSMTState, TDataStartWith 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.ActorAssembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntaxpublic void StartWith(
TState stateName,
TData stateData,
Nullable<TimeSpan> timeout = null
)
Public Sub StartWith (
stateName As TState,
stateData As TData,
Optional timeout As Nullable(Of TimeSpan) = Nothing
)
public:
void StartWith(
TState stateName,
TData stateData,
Nullable<TimeSpan> timeout = nullptr
)
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