Table of Contents

Class RoslynCompiler

Namespace
Ecng.Compilation.Roslyn
Assembly
Ecng.Compilation.Roslyn.dll

Represents a Roslyn compiler.

public abstract class RoslynCompiler : ICompiler
Inheritance
RoslynCompiler
Implements
Derived
Inherited Members
Extension Methods

Constructors

RoslynCompiler(string)

Represents a Roslyn compiler.

protected RoslynCompiler(string extension)

Parameters

extension string

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

Properties

IsCaseSensitive

Gets a value indicating whether the language is case sensitive.

public abstract bool IsCaseSensitive { get; }

Property Value

bool

IsReferencesSupported

Gets a value indicating whether the compiler supports external references.

public abstract bool IsReferencesSupported { get; }

Property Value

bool

IsTabsSupported

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

public abstract bool IsTabsSupported { get; }

Property Value

bool

Methods

Create(string, IEnumerable<string>, PortableExecutableReference[], CancellationToken)

Creates a new compilation instance.

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

Parameters

assemblyName string

The name of the assembly.

sources IEnumerable<string>

The source code files as strings.

references PortableExecutableReference[]

A collection of references.

cancellationToken CancellationToken

CancellationToken

Returns

Compilation

Microsoft.CodeAnalysis.Compilation