I would like +1 for the C# scripting style scenario. We seem to have two problems so far:
* top-level statements, as found in C# 9.0.
* extra directives that can appear in .csx script files - the are lines that start with #r, #load or #! , and are understood by VSCode and some other tools like 'dotnet script' as part of the .csx files. At the moment these are indicated as errors by the ActiPro SyntaxEditor.
Three articles with examples and context for this are:
I understand we'd have to deal at a higher level with the #r directive to figure out which other references or NuGet packages to add to the context. I'm not sure how to think about #load yet - this brings in another file into the context, but is also an extension point in the Roslyn scripting that allows custom loading behaviour. Finally, lines with the shebang #! should just be ignored as a script comment.