Beispiel #1
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);
            }
        }
 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#");
 }
Beispiel #4
0
        internal static CompilerType GetCSharpCompilerInfo(
            CompilationSection compConfig, VirtualPath configPath) {

            if (compConfig == null) {
                // Get the <compilation> config object
                compConfig = MTConfigUtil.GetCompilationConfig(configPath);
            }

            if (compConfig.DefaultLanguage == null)
                return new CompilerType(typeof(Microsoft.CSharp.CSharpCodeProvider), null);

            return compConfig.GetCompilerInfoFromLanguage("c#");
        }