Creatures.Language.Executors.Executor.Execute C# (CSharp) Method

Execute() public method

public Execute ( IEnumerable parsedCommands, IExecutorToolset executorToolset ) : string
parsedCommands IEnumerable
executorToolset IExecutorToolset
return string
        public string Execute(IEnumerable<ICommand> parsedCommands, IExecutorToolset executorToolset)
        {
            _variables = new Dictionary<string, int?>();
            _console = new StringBuilder();
            _conditions = new Stack<bool>();
            _conditions.Push(true);
            _stop = false;

            _executorToolset = executorToolset;

            foreach (var parsedCommand in parsedCommands)
            {
                if (_stop) break;

                Execute(parsedCommand);
            }

            return _console.ToString();
        }

Same methods

Executor::Execute ( ICommand command ) : void