Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
EventNode.cs
1using System.Threading.Tasks;
3
5{
9 public abstract class EventNode : StateMachineNode
10 {
14 public EventNode()
15 : base()
16 {
17 }
18
22 public abstract string Label { get; }
23
31 public abstract Task<bool> Register(int EventIndex, EvaluationArguments Arguments, OnEvent Event);
32
38 public virtual Task Unregister(int EventIndex, EvaluationArguments Arguments)
39 {
40 return Task.CompletedTask; // Do nothing by default.
41 }
42
48 public virtual Task<bool> StateUpdated(EvaluationArguments Arguments)
49 {
50 return Task.FromResult(false);
51 }
52 }
53}
Contains information required for evaluating script in a state-machine.
Abstract base class for State-Machine event nodes.
Definition: EventNode.cs:10
abstract Task< bool > Register(int EventIndex, EvaluationArguments Arguments, OnEvent Event)
Registers the event
virtual Task Unregister(int EventIndex, EvaluationArguments Arguments)
Unregisters the event
Definition: EventNode.cs:38
virtual Task< bool > StateUpdated(EvaluationArguments Arguments)
Method called when the internal state of the state-machine has been updated.
Definition: EventNode.cs:48
EventNode()
Abstract base class for State-Machine event nodes.
Definition: EventNode.cs:14
Abstract base class for State-Machine nodes.
Action executed when entering a state.
Definition: OnEvent.cs:17