2using System.Threading.Tasks;
41 public override Task
Parse(XmlElement Xml)
45 return base.Parse(Xml);
70 throw new Exception(
"Event not found: " + this.eventRef.
Definition);
72 base.CheckReferences(Machine,
Token);
82 if (this.eventRef is
null)
83 throw new Exception(
"No event id defined.");
87 throw new Exception(
"Event not found: " +
Event.
Id);
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
async Task< T > Evaluate(Variables Variables)
Evaluates the attribute
bool IsConstant
If the attribute value is a constant.
string Definition
Attribute definition
Scriptable string attribute.
Contains information required for evaluating script in a state-machine.
StateMachine Machine
Reference to state-machine definition.
Variables Variables
Current set of variables.
Represents an event definition.
async Task< bool > Register(int EventIndex, EvaluationArguments Arguments, OnEvent Event)
Registers the event
Task Unregister(int EventIndex, EvaluationArguments Arguments)
Registers the event
Abstract base class for State-Machine event nodes.
References an event definition.
string EventReferenceDefinition
Event Reference Definition
EventReference()
References an event definition.
override void CheckReferences(StateMachine Machine, Token Token)
Checks references in the node.
override Task Parse(XmlElement Xml)
Parses the State-machine node.
override string LocalName
Local name
override async Task< bool > Register(int EventIndex, EvaluationArguments Arguments, OnEvent Event)
Registers the event
override async Task Unregister(int EventIndex, EvaluationArguments Arguments)
Registers the event
override IStateMachineNode Create()
Creates a new node of the corresponding type.
override string Label
UML Label for event.
async Task< Event > GetReference(EvaluationArguments Arguments)
Evaluates the reference.
Action executed when entering a state.
Class representing a state machine.
bool TryGetEvent(string Id, out Model.Events.Event Event)
Tries to get an event.
Interface for State-Machine nodes