Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ReportEvent.cs
1using System;
2using System.Xml;
5
7{
12 {
13 private readonly string eventMessage;
14 private readonly QueryEventType type;
15 private readonly QueryEventLevel level;
16
24 {
25 this.type = Type;
26 this.level = Level;
27 this.eventMessage = EventMessage;
28 }
29
34 public ReportEvent(XmlElement Xml)
35 {
36 this.type = XML.Attribute(Xml, "type", QueryEventType.Information);
37 this.level = XML.Attribute(Xml, "level", QueryEventLevel.Minor);
38 this.eventMessage = Xml.InnerText;
39 }
40
44 public QueryEventType EventType => this.type;
45
49 public QueryEventLevel EventLevel => this.level;
50
54 public string EventMessage=> this.eventMessage;
55
60 public override void ExportXml(XmlWriter Output)
61 {
62 Output.WriteStartElement("Event");
63 Output.WriteAttributeString("type", this.type.ToString());
64 Output.WriteAttributeString("level", this.level.ToString());
65 Output.WriteValue(this.eventMessage);
66 Output.WriteEndElement();
67 }
68 }
69}
Abstract base class for report elements.
Contains information about a report event.
Definition: ReportEvent.cs:12
QueryEventLevel EventLevel
Event level
Definition: ReportEvent.cs:49
override void ExportXml(XmlWriter Output)
Exports element to XML
Definition: ReportEvent.cs:60
ReportEvent(QueryEventType Type, QueryEventLevel Level, string EventMessage)
Contains information about a report event.
Definition: ReportEvent.cs:23
ReportEvent(XmlElement Xml)
Contains information about a report event.
Definition: ReportEvent.cs:34
Helps with common XML-related tasks.
Definition: XML.cs:19
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Definition: XML.cs:914
QueryEventType
Query event type.