Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ScriptParameterNode.cs
1using System.Threading.Tasks;
5using Waher.Script;
8
10{
14 public abstract class ScriptParameterNode : VirtualNode
15 {
20 {
21 }
22
26 [Page(2, "Script", 100)]
27 [Header(36, "Page:")]
28 [ToolTip(37, "Title of page on which parameter will appear.")]
29 [Required]
30 public string Page { get; set; }
31
35 [Page(2, "Script", 100)]
36 [Header(12, "Parameter Name:")]
37 [ToolTip(13, "Parameter value can be referenced in script as a variable using this parameter name.")]
38 [Required]
39 public string ParameterName { get; set; }
40
44 [Page(2, "Script", 100)]
45 [Header(38, "Label:")]
46 [ToolTip(39, "Label shown with parameter when it is presented.")]
47 [Required]
48 public string Label { get; set; }
49
53 [Page(2, "Script", 100)]
54 [Header(33, "Description:")]
55 [ToolTip(34, "Description of parameter.")]
56 [Required]
57 public string Description { get; set; }
58
62 [Page(2, "Script", 100)]
63 [Header(40, "Required")]
64 [ToolTip(41, "If parameter is a required parameter.")]
65 public bool Required { get; set; }
66
72 public override Task<bool> AcceptsChildAsync(INode Child)
73 {
74 return Task.FromResult(false);
75 }
76
82 public override Task<bool> AcceptsParentAsync(INode Parent)
83 {
84 return Task.FromResult(Parent is ScriptCommandNodeBase);
85 }
86
93 public abstract Task PopulateForm(DataForm Parameters, Language Language, object Value);
94
104 public abstract Task SetParameter(DataForm Parameters, Language Language, bool OnlySetChanged, Variables Values,
105 SetEditableFormResult Result);
106
107 }
108}
Static class managing editable parameters in objects. Editable parameters are defined by using the at...
Definition: Parameters.cs:25
Implements support for data forms. Data Forms are defined in the following XEPs:
Definition: DataForm.cs:42
Contains information about a language.
Definition: Language.cs:17
Collection of variables.
Definition: Variables.cs:25
Abstract base class for script node commands and queries.
Represents a parameter on a command.
abstract Task SetParameter(DataForm Parameters, Language Language, bool OnlySetChanged, Variables Values, SetEditableFormResult Result)
Sets the parameters of the object, based on contents in the data form.
ScriptParameterNode()
Represents a parameter on a command.
bool Required
If parameter is required.
abstract Task PopulateForm(DataForm Parameters, Language Language, object Value)
Populates a data form with parameters for the object.
override Task< bool > AcceptsParentAsync(INode Parent)
If the node accepts a presumptive parent, i.e. can be added to that parent (if that parent accepts th...
override Task< bool > AcceptsChildAsync(INode Child)
If the node accepts a presumptive child, i.e. can receive as a child (if that child accepts the node ...
string Description
Parameter description.
Virtual node, that can be used as a placeholder for services.
Definition: VirtualNode.cs:28
Interface for nodes that are published through the concentrator interface.
Definition: INode.cs:49
INode Parent
Parent Node, or null if a root node.
Definition: INode.cs:116