BooCompiler.Tests.AbstractCompilerTestCase.Run C# (CSharp) Метод

Run() защищенный Метод

protected Run ( string stdin, CompilerContext &context ) : string
stdin string
context Boo.Lang.Compiler.CompilerContext
Результат string
        protected string Run(string stdin, out CompilerContext context)
        {
            TextWriter oldStdOut = Console.Out;
            TextReader oldStdIn = Console.In;

            try
            {
                Console.SetOut(_output);
                if (null != stdin)
                {
                    Console.SetIn(new StringReader(stdin));
                }

                context = _compiler.Run();

                if (HasErrors(context) && !IgnoreErrors)
                {
                    Assert.Fail(GetFirstInputName(context)
                                + ": "
                                + context.Errors.ToString(false)
                                + context.Warnings.ToString());
                }
                return _output.ToString().Replace("\r\n", "\n");
            }
            finally
            {
                _output.GetStringBuilder().Length = 0;

                Console.SetOut(oldStdOut);
                Console.SetIn(oldStdIn);
            }
        }