Click or drag to resize
StaMaStateMachineTemplateState Method (String, StateMachineActionCallback, StateMachineActionCallback)
Creates a State instance and starts the definition the State's substructure and contents.

Namespace: StaMa
Assembly: StaMa (in StaMa.dll) Version: 2.3.1.7
Syntax
public void State(
	string name,
	StateMachineActionCallback entryAction,
	StateMachineActionCallback exitAction
)

Parameters

name
Type: SystemString
The name of the State to be created. Must be unique within the StateMachineTemplate.
entryAction
Type: StaMaStateMachineActionCallback
A StateMachineActionCallback delegate that will be called when a StateMachine enters the State. May be null if no entry action is specified.
exitAction
Type: StaMaStateMachineActionCallback
A StateMachineActionCallback delegate that will be called when a StateMachine leaves the the State. May be null if no exit action is specified.
Exceptions
ExceptionCondition
ArgumentNullException The name is null or empty.
ArgumentOutOfRangeException The name is not a valid identifier for a State: The identifier of a State must start with a character followed by nonspace characters or digits.
ArgumentOutOfRangeException The name is not a unique: A State 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
See Also