예제 #1
0
        public void Evaluate(List <string> commands)
        {
            var input             = new List <string> {
            };
            CodeCompiler executor = new CodeCompiler(commands, input, true);

            executor.Initialize();
            executor.Execute();
            MyField.Clear();
        }
예제 #2
0
        public List <string> Evaluate(List <string> commands, IEnumerable <string> input)
        {
            List <string> newinput = new List <string> {
            };

            foreach (string inputline in input)
            {
                newinput.Add(inputline);
            }
            CodeCompiler executor = new CodeCompiler(commands, newinput, false);

            executor.Initialize();
            executor.Execute();
            var output = MyField.Output;

            MyField.Clear();
            return(output);
        }