FSM<(Of <(<'TS, TD>)>)>..::..StartWith 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 [ActorBase.PreStart()] and PostRestart(Exception).

Namespace:  Akka.Actor
Assembly:  Akka (in Akka.dll)

Syntax


public void StartWith(
	TS stateName,
	TD stateData,
	Nullable<TimeSpan> timeout
)
Public Sub StartWith ( _
	stateName As TS, _
	stateData As TD, _
	timeout As Nullable(Of TimeSpan) _
)
public:
void StartWith(
	TS stateName, 
	TD stateData, 
	Nullable<TimeSpan^> timeout
)

Parameters

stateName
Type: TS
Initial state designator.
stateData
Type: TD
Initial state data.
timeout
Type: Nullable<(Of <(<'TimeSpan>)>)>
State timeout for the initial state, overriding the default timeout for that state.