CSharpCompiler
Ecng.Compilation.Roslyn
Represents a C# compiler that supports compiling source files into an assembly.
Erbt von: RoslynCompiler
Konstruktoren
CSharpCompiler
public CSharpCompiler()
cSharpCompiler = CSharpCompiler()
Initializes a new instance of the CSharpCompiler class.
Eigenschaften
IsCaseSensitive
public override bool IsCaseSensitive { get; }
value = cSharpCompiler.IsCaseSensitive
Gets a value indicating whether the language is case sensitive.
IsReferencesSupported
public override bool IsReferencesSupported { get; }
value = cSharpCompiler.IsReferencesSupported
Gets a value indicating whether the compiler supports external references.
IsTabsSupported
public override bool IsTabsSupported { get; }
value = cSharpCompiler.IsTabsSupported
Gets a value indicating whether the compiler supports tabs in the source code.
Methoden
Create
protected override Compilation Create(string assemblyName, IEnumerable<string> sources, PortableExecutableReference[] references, CancellationToken cancellationToken)
result = cSharpCompiler.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
Rückgabe: Compilation