System.Web.Compilation.BuildProvider.GetDefaultCompilerTypeForLanguage Method

Returns the compiler settings for the build provider based on the specified language.

Syntax

protected CompilerType GetDefaultCompilerTypeForLanguage (string language)

Parameters

language
A code language name.

Returns

A System.Web.Compilation.CompilerType that represents the compiler settings for the build provider based on the specified language. The base class returns the default compiler settings for the language based on the application configuration file.

Remarks

Use the BuildProvider.GetDefaultCompilerTypeForLanguage(string) method to examine the compiler type configured in the build provider for a specific language name. Use the BuildProvider.GetDefaultCompilerType method to examine the default compiler type for a build provider.

The base System.Web.Compilation.BuildProvider class determines the default compiler type using the System.Web.Configuration.Compiler elements in the System.Web.Configuration.CompilationSection.Compilers property of the System.Web.Configuration.CompilationSection object for the configuration file. This is equivalent to examining the compiler elements in the system.web and the compiler elements in the system.codedom sections of the configuration file. For example, for the language value VB, the base class method returns a System.Web.Compilation.CompilerType object that corresponds to the configured settings for an instance of Microsoft.VisualBasic.VBCodeProvider.

When you derive from the System.Web.Compilation.BuildProvider class, you can use BuildProvider.GetDefaultCompilerTypeForLanguage(string) to set the BuildProvider.CodeCompilerType property value for the language supported by your implementation.

Requirements

Namespace: System.Web.Compilation
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0