/* * Return a CompilerType that a language maps to. */ internal static CompilerType GetCompilerInfoFromLanguage(VirtualPath configPath, string language) { // Get the <compilation> config object CompilationSection config = MTConfigUtil.GetCompilationConfig(configPath); return(config.GetCompilerInfoFromLanguage(language)); }
internal static CompilerType GetDefaultLanguageCompilerInfo(CompilationSection compConfig, VirtualPath configPath) { if (compConfig == null) { compConfig = MTConfigUtil.GetCompilationConfig(configPath); } if (compConfig.DefaultLanguage == null) { return(GetCodeDefaultLanguageCompilerInfo()); } return(compConfig.GetCompilerInfoFromLanguage(compConfig.DefaultLanguage)); }
internal static CompilerType GetCSharpCompilerInfo(CompilationSection compConfig, VirtualPath configPath) { if (compConfig == null) { compConfig = MTConfigUtil.GetCompilationConfig(configPath); } if (compConfig.DefaultLanguage == null) { return(new CompilerType(typeof(CSharpCodeProvider), null)); } return(compConfig.GetCompilerInfoFromLanguage("c#")); }
internal static CompilerType GetDefaultLanguageCompilerInfo(CompilationSection compConfig, VirtualPath configPath) { if (compConfig == null) { // Get the <compilation> config object compConfig = MTConfigUtil.GetCompilationConfig(configPath); } // If no default language was specified in config, use VB if (compConfig.DefaultLanguage == null) { return(GetCodeDefaultLanguageCompilerInfo()); } else { return(compConfig.GetCompilerInfoFromLanguage(compConfig.DefaultLanguage)); } }