Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class StartUnitVisitor : IVisitor
{
public void VisitProcessUnit(ProcessUnit unit)
{
foreach (var childUnit in unit.ChildUnits)
childUnit.AcceptVisitor(this);
}
public void VisitAgentUnit(AgentUnit unit)
{
unit.SendCommand(Command.Start);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.