Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple implemention of ICompilerSettings
class CompilerSettings : ICompilerSettings
{
private readonly CompilerLanguage _compilerLang;
private readonly string _rootDirectory = new Uri(Assembly.GetCallingAssembly().CodeBase).LocalPath;
private string _compilerPath => _compilerLang == CompilerLanguage.CSharp
? @"roslyn\csc.exe"
: @"roslyn\vbc.exe";
public CompilerSettings(CompilerLanguage compiler = CompilerLanguage.CSharp)
{
_compilerLang = compiler;
}
public string CompilerFullPath => Path.Combine(_rootDirectory, _compilerPath);
public int CompilerServerTimeToLive => 60 * 15;
public enum CompilerLanguage
{
CSharp,
VB
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.