Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ScriptQueryNode.cs
1using System.Threading.Tasks;
5
7{
12 {
17 : base()
18 {
19 }
20
24 [Page(2, "Script", 100)]
25 [Header(90, "Query script:")]
26 [ToolTip(91, "Script that gets evaluated when then query is executed.")]
27 [Text(TextPosition.AfterField, 92, "Script that is evaluated when query is executed. Use the \"this\" variable to refer to the script node publishing the query. The \"Query\" variable will contain the current state of the query, while the \"Language\" variable contains the selected language.")]
28 [ContentType("application/x-webscript")]
29 [Required]
30 public string[] QueryScript
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), 93, "Script Query");
48 }
49
55 public override async Task<ICommand> GetCommand(VirtualNode Node)
56 {
57 return new ScriptQuery(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
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.
Node defined by script.
Definition: ScriptNode.cs:19
Represents a query on a script node.
Definition: ScriptQuery.cs:21
Represents a query that can be executed on a script node or script reference node.
string[] QueryScript
Script for executing command.
override async Task< ICommand > GetCommand(VirtualNode Node)
Gets a node command based on the script command.
ScriptQueryNode()
Represents a query 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.
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