Class CodeCompiler
Assembly: Microsoft.ML.Probabilistic.Compiler.dll
Syntax
public class CodeCompiler
Fields
compilerChoice
Compiler to use: Roslyn or CodeDom.Compiler. Auto means CodeDom.Compiler on .NET full / Windows, and Roslyn on .NET Core and Mono.
Declaration
public CompilerChoice compilerChoice
Field Value
GeneratedSourceFolder
The absolute or relative path to the generated source code.
Declaration
public string GeneratedSourceFolder
Field Value
generateInMemory
If true, source code files are written out for each transformed class.
Declaration
public bool generateInMemory
Field Value
If true, causes the C# compiler to include debug information in the generated DLL.
Declaration
public bool includeDebugInformation
Field Value
language
The language that we'll compile
Declaration
protected string language
Field Value
optimizeCode
If true, causes the C# compiler to generate optimized code
Declaration
Field Value
runningOnMono
Declaration
protected bool runningOnMono
Field Value
runningOnNetCore
Declaration
protected bool runningOnNetCore
Field Value
showProgress
If true, print messages about compilation progress.
Declaration
Field Value
useExistingFiles
If true, existing source code files are used.
Declaration
public bool useExistingFiles
Field Value
writeSourceFiles
If true, source code files are written out for each transformed class.
Declaration
public bool writeSourceFiles
Field Value
Methods
Compile(List<String>, List<String>, ICollection<Assembly>)
Declaration
public CompilerResults Compile(List<string> filenames, List<string> sources, ICollection<Assembly> referencedAssemblies)
Parameters
Returns
ExpressionToString(IExpression)
Declaration
public static string ExpressionToString(IExpression expr)
Parameters
Returns
GetCompiledType(CompilerResults, ITypeDeclaration)
Declaration
public static Type GetCompiledType(CompilerResults cr, ITypeDeclaration decl)
Parameters
Returns
GetFilenameForType(String, ITypeDeclaration, String)
Declaration
public static string GetFilenameForType(string folder, ITypeDeclaration td, string suffix)
Parameters
Returns
WriteAndCompile(List<ITypeDeclaration>)
Declaration
public CompilerResults WriteAndCompile(List<ITypeDeclaration> typeDeclarations)
Parameters
Returns
WriteSource(List<ITypeDeclaration>, IList<String>, out ICollection<Assembly>)
Declaration
public List<string> WriteSource(List<ITypeDeclaration> typeDeclarations, IList<string> filenames, out ICollection<Assembly> referencedAssemblies)
Parameters
Returns