Click or drag to resize
StaMaStateMachine Class
Contains the active state of a state machine. Receives the trigger events and executes the actions according to the state machine structure defined by the StateMachineTemplate from which the StateMachine instance is created.
Inheritance Hierarchy
SystemObject
  StaMaStateMachine

Namespace: StaMa
Assembly: StaMa (in StaMa.dll) Version: 2.3.1.7
Syntax
public class StateMachine

The StateMachine type exposes the following members.

Properties
  NameDescription
Public propertyActiveStateConfiguration
Gets the active state of the StateMachine instance.
Public propertyContext
Gets additional client provided context information.
Public propertyTemplate
Gets the StateMachineTemplate instance that defines the structure for this StateMachine.
Public propertyTraceDispatchTriggerEvent
Gets or sets a callback that can be used for tracing the StateMachine operation.
Public propertyTraceStateChange
Gets or sets a callback that can be used for tracing state changes in the StateMachine.
Public propertyTraceTestTransition
Gets or sets a callback that can be used for tracing and analyzing the StateMachine operation.
Top
Methods
  NameDescription
Public methodClearEventQueue
Discards any pending events in the event queue of the StateMachine.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFinish
Finalizes the StateMachine by executing the exit actions of all active states.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodIsInState
Returns whether the StateMachine resides in the given StateConfiguration.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodCode exampleResume
Initializes the ActiveStateConfiguration and history settings from a Stream and resumes state machine execution with the stored state.
Public methodCode exampleSaveState
Saves the state machine active state and history to a Stream that may be used to resume with this state later e.g. after the hosting process has been restarted.
Public methodSendTriggerEvent(Object)
Enqueues a trigger event and starts processing the state machine, if not already inside a processing. As a result a transition may be executed by invoking exit actions, changing the active state and invoking entry actions.
Public methodSendTriggerEvent(Object, EventArgs)
Enqueues a trigger event together with additional parameters and starts processing the state machine, if not already inside a processing. As a result a transition may be executed by invoking exit actions, changing the active state and invoking entry actions.
Protected methodSetContext
Sets the context in case it is not available before construction of the StateMachine instance.
Public methodStartup
Brings the StateMachine in the initial state by invoking the entry actions of the initial states. Resets the event queue and initializes the history.
Public methodToString
Returns the human readable representation of the active state StateConfiguration of this StateMachine.
(Overrides ObjectToString.)
Top
Remarks
See Also