Class TestFSMRef<TActor, TState, TData>
This is a specialized form of the TestActorRef<TActor> with support for querying and setting the state of a Akka.Actor.FSM`2.
public class TestFSMRef<TActor, TState, TData> : TestActorRefBase<TActor>, ICanTell, IEquatable<IActorRef>, IInternalActorRef, IActorRef, IComparable<IActorRef>, ISurrogated, IComparable, IActorRefScope where TActor : FSM<TState, TData>
Type Parameters
TActor
The type of the actor.
TState
The type of the state.
TData
The type of the data.
- Inheritance
-
TestActorRefBase<TActor>TestFSMRef<TActor, TState, TData>
- Implements
-
ICanTellIEquatable<IActorRef>IInternalActorRefIActorRefIComparable<IActorRef>ISurrogatedIActorRefScope
- Inherited Members
Constructors
TestFSMRef(ActorSystem, Props, IActorRef, string, bool)
TBD
public TestFSMRef(ActorSystem system, Props props, IActorRef supervisor = null, string name = null, bool activateLogging = false)
Parameters
system
ActorSystemTBD
props
PropsTBD
supervisor
IActorRefTBD
name
stringTBD
activateLogging
boolTBD
Properties
StateData
Get current state data of this FSM.
public TData StateData { get; }
Property Value
- TData
StateName
Get current state name of this FSM.
public TState StateName { get; }
Property Value
- TState
Methods
CancelTimer(string)
Proxy for Akka.Actor.FSM`2.CancelTimer(System.String)
public void CancelTimer(string name)
Parameters
name
stringTBD
IsStateTimerActive()
Determines whether the FSM has a active state timer active.
public bool IsStateTimerActive()
Returns
- bool
true
if the FSM has a active state timer active;false
otherwise
IsTimerActive(string)
Proxy for Akka.Actor.FSM`2.IsTimerActive(System.String)
public bool IsTimerActive(string name)
Parameters
name
stringTBD
Returns
- bool
TBD
SetState(TState, TimeSpan?)
Change FSM state; but keeps the current state data. This method is directly equivalent to a transition initiated from within the FSM.
public void SetState(TState stateName, TimeSpan? timeout = null)
Parameters
stateName
TStateTBD
timeout
TimeSpan?TBD
SetState(TState, TData, TimeSpan?, Reason)
Change FSM state. This method is directly equivalent to a corresponding transition initiated from within the FSM, including timeout and stop handling.
public void SetState(TState stateName, TData stateData, TimeSpan? timeout = null, FSMBase.Reason stopReason = null)
Parameters
stateName
TStateTBD
stateData
TDataTBD
timeout
TimeSpan?TBD
stopReason
ReasonTBD
SetStateData(TData, TimeSpan?)
Change FSM state data; but do not transition to a new state name. This method is directly equivalent to a transition initiated from within the FSM.
public void SetStateData(TData stateData, TimeSpan? timeout = null)
Parameters
stateData
TDataTBD
timeout
TimeSpan?TBD
SetStateTimeout(TimeSpan)
Change FSM state timeout. This method is directly equivalent to a transition initiated from within the FSM using the current state name and data but with the specified timeout.
public void SetStateTimeout(TimeSpan timeout)
Parameters
timeout
TimeSpanTBD
SetTimer(string, object, TimeSpan, bool)
Proxy for Akka.Actor.FSM`2.SetTimer(System.String,System.Object,System.TimeSpan,System.Boolean)
public void SetTimer(string name, object msg, TimeSpan timeout, bool repeat = false)