Click or drag to resize
StaMaStateMachineTemplateTransition Method (String, String, Object, StateMachineGuardCallback, StateMachineActionCallback)

Namespace: StaMa
Assembly: StaMa (in StaMa.dll) Version: 2.3.1.7
Syntax
public void Transition(
	string name,
	string targetState,
	Object triggerEvent,
	StateMachineGuardCallback guard,
	StateMachineActionCallback transitionAction
)

Parameters

name
Type: SystemString
A name that identifies the Transition for debugging and tracing purposes. Must be unique within the StateMachineTemplate.
targetState
Type: SystemString
The name of a State instance that defines the target-State of the Transition.
triggerEvent
Type: SystemObject
A Object that represents the trigger event that will execute the transition or null to indicate an "any" transition. See also SendTriggerEvent(Object).
guard
Type: StaMaStateMachineGuardCallback
A StateMachineGuardCallback delegate that provides additional conditions for the transition; otherwise, null if no addititional conditions are neccessary.
transitionAction
Type: StaMaStateMachineActionCallback
A StateMachineActionCallback delegate that will be called when the transition is executed. May be null if no transition action is required.
Exceptions
ExceptionCondition
ArgumentNullException The name is null or empty.
ArgumentOutOfRangeException The name is not a valid identifier for a Transition: The identifier of a Transition must start with a character followed by nonspace characters or digits.
ArgumentOutOfRangeException The name is not a unique: A Transition with the same name already exists within the StateMachineTemplate instance.
StateMachineException A syntax error was detected with this or the preceeding Region, EndRegion, State, EndState or Transition statements.
Remarks

The targetState may reference any State within this StateMachineTemplate.

See Also