You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer that writes dynamic code, I need to compile code which I have to use at runtime immediately. Saving it to first to file and then load the assembly file could be a solution, but this will not work on Blazor (.NET running on WebAssembly in the webbrowser).
I would like to be able to write the assembly to a MemoryStream which I can then load using the Assembly.Load(byte[] rawAssembly) overload.
Currently adding save to Stream functionality to Compiler.cs. If you think this might be useful too I can submit a PR so you can take a look at the code.
The text was updated successfully, but these errors were encountered:
h3x4d3c1m4l
changed the title
Being able to compile to (Memory)Stream
Compile to (Memory)Stream
Oct 13, 2019
Sounds like a good idea. We have CompileSourceInMemoryAsync in Compiler.cs but it will only return success or failure (with errors). Maybe you can create a new method or improve on that one so you get the actual assembly too?
Hi,
As a developer that writes dynamic code, I need to compile code which I have to use at runtime immediately. Saving it to first to file and then load the assembly file could be a solution, but this will not work on Blazor (.NET running on WebAssembly in the webbrowser).
I would like to be able to write the assembly to a MemoryStream which I can then load using the
Assembly.Load(byte[] rawAssembly)
overload.Currently adding save to Stream functionality to
Compiler.cs
. If you think this might be useful too I can submit a PR so you can take a look at the code.The text was updated successfully, but these errors were encountered: