Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Series.cs
1using System;
2using System.Text;
3using Waher.Content;
4
6{
10 public class Series
11 {
12 private readonly StringBuilder values = new StringBuilder();
13 private bool first = true;
14
19 public Series(string Name)
20 {
21 this.values.Append(Name);
22 this.values.Append(":=[");
23 }
24
29 public void Add(double Value)
30 {
31 if (this.first)
32 this.first = false;
33 else
34 this.values.Append(',');
35
36 this.values.Append(CommonTypes.Encode(Value));
37 }
38
43 public string EndSeries()
44 {
45 this.values.Append("];");
46 return this.values.ToString();
47 }
48 }
49}
string EndSeries()
Ends the series.
Definition: Series.cs:43
Series(string Name)
Represents a data series.
Definition: Series.cs:19
void Add(double Value)
Adds a value to the series.
Definition: Series.cs:29
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