ashmind / SharpLab

.NET language playground
https://sharplab.io
BSD 2-Clause "Simplified" License
2.72k stars 200 forks source link

Add support for Roslyn Scripting #228

Open svick opened 6 years ago

svick commented 6 years ago

I think SharpLab works quite well for short pieces of code with as little boilerplate code as possible. One way to decrease the necessary boilerplate is to use Roslyn scripting mode (i.e. compiling with CSharpParseOptions.Kind set to Script). So, I think allowing that would be useful.

The resulting decompilation or disassembly would not be representative of regular C#, so it would be mostly useful with the other kinds of Results.

I have found https://github.com/ashmind/SharpLab/issues/4, which I think talks about this. As far as I know, Roslyn scripting is stable, just like the rest of the API in Roslyn NuGet packages.

ashmind commented 6 years ago

@svick Yep thanks for reminding about it, I'll look into this (no timeline though).