Class RoslynCompilerUtils
Helper class to use the compiler platform with predefined configurations
for optimization and an in memory compilation with all .net core necessary dependencies.
Inheritance
System.Object
RoslynCompilerUtils
Namespace: Mars.Core.Data.Compiler
Assembly: Mars.Core.dll
Syntax
public static class RoslynCompilerUtils : object
Methods
CompileSourceCode(String, IEnumerable<String>, out IEnumerable<Diagnostic>)
Compile a code file and load it into the running program.
Declaration
public static Assembly CompileSourceCode(string codeFile, IEnumerable<string> dependencies, out IEnumerable<Diagnostic> diagnostics)
Parameters
Type | Name | Description |
---|---|---|
System.String | codeFile | The complete source code file. |
IEnumerable<System.String> | dependencies | All referenced DLLs needed for compilation. |
IEnumerable<Diagnostic> | diagnostics | Out parameter with all compiler diagnostics for infos, warnings and errors |
Returns
Type | Description |
---|---|
Assembly | Compiled and loaded DLL or 'null', if any compilation error occured. |