Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DoubleParameter.cs
1using System.Text;
2using Waher.Content;
3
5{
10 {
11 private double value;
12
17 : base()
18 {
19 this.value = 0;
20 }
21
28 public DoubleParameter(string Id, string Name, double Value)
29 : base(Id, Name)
30 {
31 this.value = Value;
32 }
33
37 public double Value
38 {
39 get => this.value;
40 set => this.value = value;
41 }
42
46 public override object UntypedValue => this.value;
47
52 public override void Export(StringBuilder Xml)
53 {
54 Xml.Append("<double");
55 base.Export(Xml);
56 Xml.Append(" value='");
57 Xml.Append(CommonTypes.Encode(this.value));
58 Xml.Append("'/>");
59 }
60 }
61}
Helps with parsing of commong data types.
Definition: CommonTypes.cs:13
static string Encode(bool x)
Encodes a Boolean for use in XML and other formats.
Definition: CommonTypes.cs:594
override void Export(StringBuilder Xml)
Exports the parameters to XML.
override object UntypedValue
Untyped parameter value
DoubleParameter(string Id, string Name, double Value)
Double-valued parameter.
Base class for all node parameters.
Definition: Parameter.cs:10