2using System.Collections.Generic;
4using System.Threading.Tasks;
49 public override Task
FromXml(XmlElement Definition)
53 return base.FromXml(Definition);
64 return base.Initialize();
84 DateTime Now = DateTime.Now;
85 DateTime TP = Now + this.limit;
86 double ms = (TP - Now).TotalMilliseconds;
90 return Task.Delay((
int)ms);
100 public void ExportPlantUml(StreamWriter Output,
int Indentation,
bool First,
char QuoteChar)
102 Indent(Output, Indentation);
105 Output.WriteLine(
"split");
107 Output.WriteLine(
"split again");
110 Indent(Output, Indentation);
112 Output.Write(
"#FireBrick:");
113 Values.Duration.ExportText(this.limit, Output);
114 Output.WriteLine(
"<");
116 base.ExportPlantUml(Output, Indentation + 1, QuoteChar);
Root node of a simulation model
Represents an activity that can be executed as the result of triggered events.
static async Task ExecuteActivity(Variables Variables, LinkedListNode< IActivityNode > Start)
Executes an activity by executing a possibly branching sequence of nodes.
Abstract base class for activity nodes
LinkedListNode< IActivityNode > FirstNode
First child activity node.
Adds a timeout limit in a Wait statement.
Timeout(ISimulationNode Parent, Model Model)
Adds a timeout limit in a Wait statement.
void ExportPlantUml(StreamWriter Output, int Indentation, bool First, char QuoteChar)
Exports PlantUML
override Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
override Task Initialize()
Initialized the node before simulation.
Task GetTask()
Gets a task object.
override async Task< LinkedListNode< IActivityNode > > Execute(Variables Variables)
Executes a node.
override ISimulationNode Create(ISimulationNode Parent, Model Model)
Creates a new instance of the node.
override string LocalName
Local name of XML element defining contents of class.
Conditional execution in an activity, based on external events.
void Register(ITriggerNode Node)
Register a trigger node.
static void Indent(StreamWriter Output, int Indentation)
Adds indentation to the current row.
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.
Interface for trigger nodes
Represents a duration value, as defined by the xsd:duration data type: http://www....
static readonly Duration Zero
Zero value