次の方法で共有


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 クラスは、構成ファイルのCompilationSection オブジェクトのCompilers プロパティのCompiler要素を使用して、既定のコンパイラの種類を決定します。 これは、構成ファイルのcompilersセクションでbuildProviders要素とcompiler要素を調べるのと同じです。 たとえば、languageVBの場合、基底クラス メソッドは、Microsoft.VisualBasic.VBCodeProviderのインスタンスに対して構成された設定に対応するCompilerType オブジェクトを返します。

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

適用対象

こちらもご覧ください