示例#1
0
        public void Execute(string line)
        {
            ICommand executableCommand = new CommandsRunner();

            foreach (ICommand command in this.EvalCommands(line))
            {
                executableCommand.AddCommand(command);
            }

            executableCommand.Execute();
        }
示例#2
0
        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);
        }