Table of Contents

Class TestFSMRef<TActor, TState, TData>

Namespace
Akka.TestKit
Assembly
Akka.TestKit.dll

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
TestFSMRef<TActor, TState, TData>
Implements
ICanTell
IEquatable<IActorRef>
IInternalActorRef
IActorRef
IComparable<IActorRef>
ISurrogated
IActorRefScope
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 ActorSystem

TBD

props Props

TBD

supervisor IActorRef

TBD

name string

TBD

activateLogging bool

TBD

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 string

TBD

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 string

TBD

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 TState

TBD

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 TState

TBD

stateData TData

TBD

timeout TimeSpan?

TBD

stopReason Reason

TBD

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 TData

TBD

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 TimeSpan

TBD

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)

Parameters

name string

TBD

msg object

TBD

timeout TimeSpan

TBD

repeat bool

TBD