Example #1
0
        /*
         * 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));
        }
Example #2
0
 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));
 }
Example #3
0
 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#"));
 }
Example #4
0
        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));
            }
        }