1using System.Collections.Generic;
2using System.Threading.Tasks;
22 [
Page(2,
"Script", 100)]
23 [Header(88,
"Restrict to options.")]
24 [ToolTip(89,
"If only values defined in options are valid values.")]
46 public async Task<KeyValuePair<string, string>[]>
GetOptions()
51 IEnumerable<INode> Children = await this.
ChildNodes;
55 List<KeyValuePair<string, string>> Result =
null;
57 foreach (
INode Child
in Children)
62 Result =
new List<KeyValuePair<string, string>>();
64 Result.Add(
new KeyValuePair<string, string>(Option.Label, Option.Value));
68 return Result?.ToArray();
Represents a string-valued option.
Represents a parameter with possible options on a command.
override bool ChildrenOrdered
If the children of the node have an intrinsic order (true), or if the order is not important (false).
bool RestrictToOptions
Optional minimum value allowed.
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 ...
ScriptParameterNodeWithOptions()
Represents a parameter with possible options on a command.
async Task< KeyValuePair< string, string >[]> GetOptions()
Gets available options, if any are defined.
Represents a parameter on a command.
string Page
Parameter name.
Interface for nodes that are published through the concentrator interface.
bool HasChildren
If the source has any child sources.
Task< IEnumerable< INode > > ChildNodes
Child nodes. If no child nodes are available, null is returned.