///<summary>Compiles an in-memory string.</summary> public static async Task <string> CompileSourceAsync(this NodeExecutorBase compiler, string source, string sourceExtension) { var sourceFileName = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + sourceExtension); try { File.WriteAllText(sourceFileName, source); return(await compiler.CompileToStringAsync(sourceFileName)); } finally { File.Delete(sourceFileName); } }