Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ReportBooleanAttribute.cs
1
using
System
;
2
using
System.Xml;
3
using
Waher.Content
;
4
5
namespace
Waher.Reports.Model.Attributes
6
{
10
public
class
ReportBooleanAttribute
:
ReportAttribute
<bool>
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
}
Waher.Content.CommonTypes
Helps with parsing of commong data types.
Definition:
CommonTypes.cs:15
Waher.Content.CommonTypes.TryParse
static bool TryParse(string s, out double Value)
Tries to decode a string encoded double.
Definition:
CommonTypes.cs:48
Waher.Reports.Model.Attributes.ReportAttribute
Abstract base class for report attributes.
Definition:
ReportAttribute.cs:15
Waher.Reports.Model.Attributes.ReportBooleanAttribute
Report Boolean attribute.
Definition:
ReportBooleanAttribute.cs:11
Waher.Reports.Model.Attributes.ReportBooleanAttribute.ParseValue
override bool ParseValue(string s)
Parses a string representation of a value.
Definition:
ReportBooleanAttribute.cs:27
Waher.Reports.Model.Attributes.ReportBooleanAttribute.ReportBooleanAttribute
ReportBooleanAttribute(XmlElement Xml, string AttributeName)
Report Boolean attribute.
Definition:
ReportBooleanAttribute.cs:17
System
Definition:
Adapters.g.cs:58
Waher.Content
Definition:
Array.cs:6
Waher.Reports.Model.Attributes
Definition:
ReportAttribute.cs:9
IoTGateway
Reports
Waher.Reports.Files
Model
Attributes
ReportBooleanAttribute.cs
Generated by
1.9.5