public static void Main(string[] args) { var program = new ProgramState() { ExecutionStack = GetExampleProgram2() }; IRepository repository = new Repository.Repository( "/home/bogdanboboc97/RiderProjects/ToyLanguage/ToyLanguage/logFile.txt", new List <ProgramState>(new[] { program })); var controller = new ToyLanguageController(repository); var menu = new TextMenu(); menu.AddCommand(new ExitCommand(controller)); menu.AddCommand(new RunProgramCommand(controller)); menu.Run(); }
public ExitCommand(ToyLanguageController controller, string name = "exit", string description = "Exit program.") : base(controller, name, description) { }
public RunProgramCommand(ToyLanguageController controller, string name = "run", string description = "Run program.") : base(controller, name, description) { }
protected CommandBase(ToyLanguageController controller, string name, string description) { _controller = controller; Description = description; Name = name; }