Ejemplo n.º 1
0
        private bool CompileCodeSnippet(fit.Parse cell, string code)
        {
            TestCompiler compiler = new TestCompiler(
                new string[] { "system.dll", "nunit.framework.dll" },
                testAssembly);

            CompilerResults results = compiler.CompileCode(code);

            if (results.NativeCompilerReturnValue == 0)
            {
                return(true);
            }

            cell.addToBody("<font size=-1 color=\"#c08080\"><i>Compiler errors</i></font>");

            wrong(cell);
            cell.addToBody("<hr>");

            foreach (string line in results.Output)
            {
                cell.addToBody(line + "<br>");
            }

            return(true);
        }
Ejemplo n.º 2
0
		private bool CompileCodeSnippet( fit.Parse cell, string code )
		{
			TestCompiler compiler = new TestCompiler( 
				new string[] { "system.dll", "nunit.framework.dll" }, 
				testAssembly );

			CompilerResults results = compiler.CompileCode( code );
			if ( results.NativeCompilerReturnValue == 0 )
				return true;

			cell.addToBody( "<font size=-1 color=\"#c08080\"><i>Compiler errors</i></font>" );

			wrong( cell );
			cell.addToBody( "<hr>" );
				
			foreach( string line in results.Output )
				cell.addToBody( line + "<br>" );

			return true;
		}