Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ScriptableEnumAttribute.cs
1using System;
2
4{
9 where T : struct
10 {
17 : base(Definition, Node)
18 {
19 }
20
26 public override T ParseValue(string s)
27 {
28 if (Enum.TryParse(s, out T Parsed))
29 return Parsed;
30 else
31 throw new ArgumentException("Invalid enumeration value: " + s, nameof(s));
32 }
33 }
34}
ScriptableEnumAttribute(string Definition, StateMachineNode Node)
Scriptable enumeration attribute.
override T ParseValue(string s)
Parses a string representation of a value.
Abstract base class for State-Machine nodes.