RoslynCompiler

Ecng.Compilation.Roslyn

Represents a Roslyn compiler.

实现: ICompiler

构造函数

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

Represents a Roslyn compiler.

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

属性

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.

方法

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

返回值: Compilation