Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ParameterOption.cs
2using System.Threading.Tasks;
3using System.Xml;
5using Waher.Script;
6
8{
13 {
14 private readonly ReportStringAttribute label;
15 private readonly ReportStringAttribute value;
16
21 public ParameterOption(XmlElement Xml)
22 : base()
23 {
24 this.label = new ReportStringAttribute(Xml, "label");
25 this.value = new ReportStringAttribute(Xml, "value");
26 }
27
33 public async Task<KeyValuePair<string, string>> GetTag(Variables Variables)
34 {
35 return new KeyValuePair<string, string>(
36 await this.label.Evaluate(Variables),
37 await this.value.Evaluate(Variables));
38 }
39
45 public async Task<KeyValuePair<string, string>[]> GetOptions(Variables Variables)
46 {
47 return new KeyValuePair<string, string>[]
48 {
49 await this.GetTag(Variables)
50 };
51 }
52
53 }
54}
ParameterOption(XmlElement Xml)
Represents a string-valued option.
async Task< KeyValuePair< string, string > > GetTag(Variables Variables)
Evaluates report option attributes.
async Task< KeyValuePair< string, string >[]> GetOptions(Variables Variables)
Gets the options for the parameter.
Collection of variables.
Definition: Variables.cs:25
Interface for classes implementing parameter options.