1using System.Collections.Generic;
10 private string[] names =
null;
11 private int mask = -1;
22 set => this.names = value;
29 set => this.mask = value;
34 bool? b = base.Evaluate(
Context);
35 if (b.HasValue && !b.Value)
38 Context.Types = (
FieldType)((
int)Context.Types & this.mask);
42 if (!(this.names is
null))
44 Dictionary<string, bool> Names =
new Dictionary<string, bool>();
46 foreach (
string Field in this.names)
55 Context.Names = Names;
65 public override void Export(XmlWriter Output)
68 Output.WriteAttributeString(
"mask", this.mask.ToString());
70 if (!(this.names is
null))
72 foreach (
string Name
in this.names)
73 Output.WriteElementString(
"Name", Name);
76 base.ExportChildren(Output);
78 Output.WriteEndElement();
override void Export(XmlWriter Output)
Exports the rule.
override? bool Evaluate(Context Context)
Tries to evaluate the rule.
Abstract base class for rules.
const string RuleNamespace
http://waher.se/Schema/Provisioning/Rules.xsd
Base class for all sensor data fields.
FieldType
Field Type flags