public static object invokeFirstMethod(this CommonCompilation compiler) { if (compiler.hasErrors()) { "[invokeFirstMethod] compiler errors: {0}".error(compiler.errors_Details()); return(null); } var assembly = compiler.create_Assembly(); if (assembly.isNull()) { "[invokeFirstMethod] failed to create assembly".error(); return(null); } return(assembly.types() .methods() .first() .invoke()); }
public static Assembly create_Assembly_IntoDisk(this CommonCompilation compilation) { var fileToCreate = PublicDI.config.O2TempDir.pathCombine("_dynamicDll_{0}.dll".format(5.randomLetters())); return(compilation.create_Assembly(fileToCreate)); }