Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ScriptCommandNode.cs
1using System.Threading.Tasks;
5
7{
12 {
17 : base()
18 {
19 }
20
24 [Page(2, "Script", 100)]
25 [Header(9, "Command script:")]
26 [ToolTip(10, "Script that gets evaluated when then command is executed.")]
27 [Text(TextPosition.AfterField, 28, "Script that is evaluated when command is executed. Use the \"this\" variable to refer to the script node publishing the command.")]
28 [ContentType("application/x-webscript")]
29 [Required]
30 public string[] CommandScript
31 {
32 get => this.script;
33 set
34 {
35 this.script = value;
36 this.parsedScript = null;
37 }
38 }
39
45 public override Task<string> GetTypeNameAsync(Language Language)
46 {
47 return Language.GetStringAsync(typeof(ScriptNode), 11, "Script Command");
48 }
49
55 public override async Task<ICommand> GetCommand(VirtualNode Node)
56 {
57 return new ScriptCommand(Node, this, await this.GetParameters(Node));
58 }
59 }
60}
Contains information about a language.
Definition: Language.cs:17
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Definition: Language.cs:209
Represents a command on a script node.
Abstract base class for script node commands and queries.
string[] script
Unparsed script expression.
async Task< ScriptParameterNode[]> GetParameters(VirtualNode Node)
Gets a node command based on the script command.
Represents a command that can be executed on a script node or script reference node.
ScriptCommandNode()
Represents a command that can be executed on a script node or script reference node.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
override async Task< ICommand > GetCommand(VirtualNode Node)
Gets a node command based on the script command.
string[] CommandScript
Script for executing command.
Node defined by script.
Definition: ScriptNode.cs:19
Virtual node, that can be used as a placeholder for services.
Definition: VirtualNode.cs:28
TextPosition
Where the instructions are to be place.
Definition: TextAttribute.cs:9