Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ReportBooleanAttribute.cs
1using System;
2using System.Xml;
3using Waher.Content;
4
6{
11 {
17 public ReportBooleanAttribute(XmlElement Xml, string AttributeName)
18 : base(Xml, AttributeName)
19 {
20 }
21
27 public override bool ParseValue(string s)
28 {
29 if (CommonTypes.TryParse(s, out bool b))
30 return b;
31 else
32 throw new ArgumentException("Invalid Boolean value: " + s, nameof(s));
33 }
34 }
35}
Helps with parsing of commong data types.
Definition: CommonTypes.cs:15
static bool TryParse(string s, out double Value)
Tries to decode a string encoded double.
Definition: CommonTypes.cs:48
Abstract base class for report attributes.
override bool ParseValue(string s)
Parses a string representation of a value.
ReportBooleanAttribute(XmlElement Xml, string AttributeName)
Report Boolean attribute.