2using System.Collections.Generic;
3using System.Threading.Tasks;
97 public override async Task
Parse(XmlElement Xml)
102 await base.Parse(Xml);
130 base.OnChildNodesUpdated();
132 this.message = this.GetValueElement<Message>();
133 this.@
object = this.GetValueElement<Object>();
134 this.actor = this.GetValueElement<Actor>();
135 this.eventId = this.GetValueElement<EventId>();
136 this.module = this.GetValueElement<Module>();
137 this.facility = this.GetValueElement<Facility>();
138 this.tags = this.GetChildElements<Tag>();
148 string Object = this.@
object is
null ? string.Empty : (await this.@
object.Evaluate(Arguments))?.ToString();
149 string Actor = this.actor is
null ? string.Empty : (await this.actor.
Evaluate(Arguments))?.ToString();
150 string EventId = this.eventId is
null ? string.Empty : (await this.eventId.
Evaluate(Arguments))?.ToString();
151 string Module = this.module is
null ? string.Empty : (await this.module.
Evaluate(Arguments))?.ToString();
152 string Facility = this.facility is
null ? string.Empty : (await this.facility.
Evaluate(Arguments))?.ToString();
153 List<KeyValuePair<string, object>>
Tags =
new List<KeyValuePair<string, object>>();
155 foreach (
Tag Tag in this.tags)
157 Tags.Add(
new KeyValuePair<string, object>(
158 (await
Tag.
Key.Evaluate(Arguments))?.ToString(),
159 await
Tag.
Value.Evaluate(Arguments)));
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Class representing an event.
Static class managing the application event log. Applications and services log events on this static ...
static async void Event(Event Event)
Logs an event. It will be distributed to registered event sinks.
Abstract base class for State-Machine action nodes.
Logs an event to the event log.
LogEvent()
Logs an event to the event log.
override IStateMachineNode Create()
Creates a new node of the corresponding type.
EventLevel Level
Event Level
override void OnChildNodesUpdated()
Method called whenever ChildNodes is updated.
override string LocalName
Local name
override async Task Execute(EvaluationArguments Arguments)
Evaluates the action node
override async Task Parse(XmlElement Xml)
Parses the State-machine node.
Defines a Name-Value Tag.
HeaderValue Value
Value value
Contains information required for evaluating script in a state-machine.
void ConvertValueAttributesToElements(XmlElement Xml, Type[] ValueTypes, bool[] Required)
Converts value attributes to parsed elements. The XML definition has to be parsed before,...
Task< object > Evaluate(EvaluationArguments Arguments)
Evaluates the value node.
Interface for State-Machine nodes