Class RoslynCompiler
Inheritance
System.Object
Namespace: Umbraco.Cms.Infrastructure.ModelsBuilder
Assembly: Umbraco.Infrastructure.dll
Syntax
public class RoslynCompiler
Constructors
View SourceRoslynCompiler()
Initializes a new instance of the RoslynCompiler class.
Declaration
public RoslynCompiler()
Remarks
Roslyn compiler which can be used to compile a c# file to a Dll assembly
Fields
View SourceGeneratedAssemblyName
Declaration
public const string GeneratedAssemblyName = "ModelsGeneratedAssembly"
Field Value
Type | Description |
---|---|
System.String |
Methods
View SourceCompileToFile(String, String)
Compile a source file to a dll
Declaration
public void CompileToFile(string pathToSourceFile, string savePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | pathToSourceFile | Path to the source file containing the code to be compiled. |
System.String | savePath | The path where the output assembly will be saved. |