public static Assembly assembly(this CSharp_FastCompiler csharpCompiler) { if (csharpCompiler != null) { if (csharpCompiler.compiledAssembly().notNull()) { return(csharpCompiler.compiledAssembly()); } if (csharpCompiler.compilerResults() != null) { if (csharpCompiler.compilerResults().Errors.HasErrors == false) { if (csharpCompiler.compilerResults().CompiledAssembly != null) { return(csharpCompiler.compilerResults().CompiledAssembly); } } else { "CompilationErrors:".line().add(csharpCompiler.compilationErrors()).error(); } } } return(null); }
public void executeCompiledCode() { O2Thread.mtaThread(() => { try { if (csharpCompiler != null) { //if (csharpCompiler.CompilerResults != null) if (csharpCompiler.compiledAssembly() != null) { var result = csharpCompiler.executeFirstMethod(); showInfo("Execution Completed", result); } } } catch (Exception ex) { PublicDI.log.ex(ex, "in executeCompiledCode"); } }); }