BuildProvider.GetDefaultCompilerTypeForLanguage(String) メソッド

定義

指定された言語に基づいて、ビルド プロバイダーのコンパイラ設定値を返します。

protected:
 System::Web::Compilation::CompilerType ^ GetDefaultCompilerTypeForLanguage(System::String ^ language);
protected System.Web.Compilation.CompilerType GetDefaultCompilerTypeForLanguage (string language);
member this.GetDefaultCompilerTypeForLanguage : string -> System.Web.Compilation.CompilerType
Protected Function GetDefaultCompilerTypeForLanguage (language As String) As CompilerType

パラメーター

language
String

コード言語の名前。

戻り値

指定された言語に基づくビルド プロバイダーのコンパイラ設定値を表す CompilerType。 基本クラスは、アプリケーションの構成ファイルに基づいて、その言語の既定コンパイラ設定値を返します。

例外

languagenullです。

language が、そのビルド プロバイダーに対して構成されているコンパイラと一致しません。

注釈

メソッドを GetDefaultCompilerTypeForLanguage 使用して、特定の言語名についてビルド プロバイダーで構成されているコンパイラの種類を調べます。 ビルド プロバイダーの GetDefaultCompilerType 既定のコンパイラの種類を調べるには、 メソッドを使用します。

基本BuildProviderクラスは、構成ファイルの オブジェクトの プロパティの 要素をCompilerCompilers使用して、既定のコンパイラ型CompilationSectionを決定します。 これは、構成ファイルのセクション内のbuildProviders要素と要素をcompilers調べるのとcompiler同じです。 たとえば、 値VBlanguage 場合、基底クラス メソッドは、 のインスタンスMicrosoft.VisualBasic.VBCodeProviderに対して構成された設定に対応する オブジェクトを返CompilerTypeします。

クラスから派生する場合は、 を BuildProvider 使用 GetDefaultCompilerTypeForLanguage して、 CodeCompilerType 実装でサポートされている言語のプロパティ値を設定できます。

適用対象

こちらもご覧ください