Last active
February 2, 2019 20:06
-
-
Save kosanmil/a84b1f3a6c655dcc4a1c10321b7e6972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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