public void Execute(string line) { ICommand executableCommand = new CommandsRunner(); foreach (ICommand command in this.EvalCommands(line)) { executableCommand.AddCommand(command); } executableCommand.Execute(); }
private ICommand ReadConsoleCommands() { ICommand executableCommand = new CommandsRunner(); if (GlobalScope.InputReader.GetString(out string inputString)) { foreach (ICommand command in this.EvalCommands(inputString)) { executableCommand.AddCommand(command); } } return(executableCommand); }