RoslynCompiler

Ecng.Compilation.Roslyn

Represents a Roslyn compiler.

Implements: ICompiler

Constructors

RoslynCompiler
protected RoslynCompiler(string extension)
roslynCompiler = RoslynCompiler(extension)

Represents a Roslyn compiler.

extension
The file extension of the source files that the compiler supports.

Properties

IsCaseSensitive
public abstract bool IsCaseSensitive { get; }
value = roslynCompiler.IsCaseSensitive

Gets a value indicating whether the language is case sensitive.

IsReferencesSupported
public abstract bool IsReferencesSupported { get; }
value = roslynCompiler.IsReferencesSupported

Gets a value indicating whether the compiler supports external references.

IsTabsSupported
public abstract bool IsTabsSupported { get; }
value = roslynCompiler.IsTabsSupported

Gets a value indicating whether the compiler supports tabs in the source code.

Methods

Create
protected abstract Compilation Create(string assemblyName, IEnumerable<string> sources, PortableExecutableReference[] references, CancellationToken cancellationToken)
result = roslynCompiler.Create(assemblyName, sources, references, cancellationToken)

Creates a new compilation instance.

assemblyName
The name of the assembly.
sources
The source code files as strings.
references
A collection of references.
cancellationToken
CancellationToken

Returns: Compilation