Click or drag to resize
StaMaStateMachineContext Property
Gets additional client provided context information.

Namespace: StaMa
Assembly: StaMa (in StaMa.dll) Version: 2.3.1.7
Syntax
public Object Context { get; }

Property Value

Type: Object
A Object instance that may be used to provide additional context information within an action or guard condition given through StateMachineActionCallback and StateMachineGuardCallback.
Remarks
The Context property may be used in case the StateMachineActionCallback are coosen as static methods of the client class of the StateMachine. In this case the Context property may carry the client instance in order to forward the action to non-static methods of the client instance. This may be a reasonable strategy in case there are many StateMachine instances with the same StateMachineTemplate. Coosing the StateMachineTemplate as a static member of the client class could then improve startup performance of state machines doing the structural checks in the StateMachineTemplate only once for all StateMachine instances.
See Also