CSharpScriptExecution.CompileAssembly
Compiles the source code for a complete class and then loads the resulting assembly.
Loads the generated assembly and sets the .Assembly
property if successful.
If OutputAssembly
is set, the assembly is compiled to the specified file.
Otherwise the assembly is compiled 'in-memory' and cleaned up by the host
application/runtime.
Must include parameterless ctor()
public bool CompileAssembly(Stream codeInputStream, bool noLoad)
Parameters
codeInputStream
Stream that contains C# code
noLoad
If set won't load the assembly and just compiles it. Useful only if OutputAssembly is set so you can explicitly load the assembly later.