Class FSMBase.State<TS, TD>
This captures all of the managed state of the FSM<TState, TData>: the state name, the state data, possibly custom timeout, stop reason, and replies accumulated while processing the last message.
Implements
Inherited Members
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public sealed class FSMBase.State<TS, TD> : IEquatable<FSMBase.State<TS, TD>>
Type Parameters
Name | Description |
---|---|
TS | The name of the state |
TD | The data of the state |
Constructors
| Edit this page View SourceState(TS, TD, TimeSpan?, Reason, IReadOnlyList<object>, bool)
Initializes a new instance of the State
Declaration
public State(TS stateName, TD stateData, TimeSpan? timeout = null, FSMBase.Reason stopReason = null, IReadOnlyList<object> replies = null, bool notifies = true)
Parameters
Type | Name | Description |
---|---|---|
TS | stateName | TBD |
TD | stateData | TBD |
TimeSpan? | timeout | TBD |
FSMBase.Reason | stopReason | TBD |
IReadOnlyList<object> | replies | TBD |
bool | notifies | TBD |
Properties
| Edit this page View SourceReplies
Optional - the set of replies to send to subscribers.
Declaration
public IReadOnlyList<object> Replies { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<object> |
StateData
The data belonging to this sate
Declaration
public TD StateData { get; }
Property Value
Type | Description |
---|---|
TD |
StateName
The name of this state
Declaration
public TS StateName { get; }
Property Value
Type | Description |
---|---|
TS |
StopReason
Optional - the reason why we're stopping.
Declaration
public FSMBase.Reason StopReason { get; }
Property Value
Type | Description |
---|---|
FSMBase.Reason |
Timeout
Optional. The state timeout.
Declaration
public TimeSpan? Timeout { get; }
Property Value
Type | Description |
---|---|
TimeSpan? |
Methods
| Edit this page View SourceEquals(State<TS, TD>)
Declaration
public bool Equals(FSMBase.State<TS, TD> other)
Parameters
Type | Name | Description |
---|---|---|
FSMBase.State<TS, TD> | other |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceForMax(TimeSpan)
Modify the state transition descriptor to include a state timeout for the
next state. This timeout overrides any default timeout set for the next state.
Declaration
public FSMBase.State<TS, TD> ForMax(TimeSpan timeout)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timeout | TBD |
Returns
Type | Description |
---|---|
FSMBase.State<TS, TD> | TBD |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceReplying(object)
Send reply to sender of the current message, if available.
Declaration
public FSMBase.State<TS, TD> Replying(object replyValue)
Parameters
Type | Name | Description |
---|---|---|
object | replyValue | TBD |
Returns
Type | Description |
---|---|
FSMBase.State<TS, TD> | TBD |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceUsing(TD)
Modify state transition descriptor with new state data. The data will be set when transitioning to the new state.
Declaration
public FSMBase.State<TS, TD> Using(TD nextStateData)
Parameters
Type | Name | Description |
---|---|---|
TD | nextStateData | TBD |
Returns
Type | Description |
---|---|
FSMBase.State<TS, TD> | TBD |