Run command Script to execute linq script and get HTML leads to incomplete HTML on async void main
i try to save the result of an run linqpadscript (lprun) as Windows Task to html file.
Sometime the html is incomplete.
a) Working sample
When i run
main.linq
using (var queryExecutor = Util.Compile("mytestscript.ling"))
{
var executor = queryExecutor.Run(QueryResultFormat.Html);
executor.Wait();
var result = executor.AsString();
result.Dump();
....
myTestscript.linq
public void (){
MyTest();
}
MyTest(){
grid().Dump();
"Info".Dump();
}
I get as result.Dump() =>
htmlheader
html
b) Make testscript async - not working
myTestscript.linq
async task void (){
await MyTestasync();
// MyTestasync.Wait() also not working
}
async task MyTestAsync(){
"Info".Dump();
await gridAsync().Dump();
}
the result is in incomplete html without htmlheader. It starts direct with the output:
"Info" < br > ...
does it need some kind of UI Synchronization?