Step-through execution of a flowchart. The simulator walks connection lines in port order; when a node has multiple outgoing edges (decisions, loops, forks) the optional BranchSelector chooses the branch (defaults to the first edge).

Members

MemberKindDescription
SkiaComponent? CurrentNodePropertyGets the node the simulation is currently on.
bool IsFinishedPropertyGets a value indicating whether the simulation reached a terminal node.
int StepCountPropertyGets the number of steps executed since the last reset.
List<string> TracePropertyGets the execution trace (node labels in visit order).
Func<SkiaComponent, IReadOnlyList<SimulationEdge>, SimulationEdge?>? BranchSelectorPropertyOptional branch selector for nodes with multiple outgoing edges. Return null to fall back to the first edge.
event EventHandler<SimulationStepEventArgs>? SteppedEventRaised after each step.
void Reset(IReadOnlyList<SkiaComponent> components, IReadOnlyList<IConnectionLine> lines)MethodResets the simulation to the entry node of the given diagram.
bool Step()MethodAdvances the simulation by one node. Returns false when already finished.
bool Run(int maxSteps = 1000)MethodRuns until finished or the step cap is reached. True when the simulation finished naturally; false when capped.

Related