StateMachine class
Type that implements a state machine actor. Inherit from this class to declare a custom actor with states, state transitions and event handlers.
public abstract class StateMachine : Actor
Public Members
name | description |
---|---|
abstract class State | Abstract class representing a state. |
abstract class StateGroup | Abstract class used for representing a group of related states. |
Protected Members
name | description |
---|---|
StateMachine() | Initializes a new instance of the StateMachine class. |
CurrentState { get; } | Gets the Type of the current state. |
override OnEventHandledAsync(…) | Asynchronous callback that is invoked when the actor finishes handling a dequeued event, unless the handler of the dequeued event raised an event or caused the actor to halt (either normally or due to an exception). Unless this callback raises an event, the actor will either become idle or dequeue the next event from its inbox. |
RaiseEvent(…) | Raises the specified Event at the end of the current action. |
RaiseGotoStateEvent(…) | Raise a special event that performs a goto state operation at the end of the current action. |
RaiseGotoStateEvent<TState>() | Raise a special event that performs a goto state operation at the end of the current action. |
RaiseHaltEvent() | Raises a HaltEvent to halt the actor at the end of the current action. |
RaisePopStateEvent() | Raise a special event that performs a pop state operation at the end of the current action. |
RaisePushStateEvent(…) | Raise a special event that performs a push state operation at the end of the current action. |
RaisePushStateEvent<TState>() | Raise a special event that performs a push state operation at the end of the current action. |
Remarks
See State machines for more information.
See Also
- class Actor
- namespace Microsoft.Coyote.Actors
- assembly Microsoft.Coyote.Actors