ClientBuildManager.GenerateCodeCompileUnit 方法

定义

为按虚拟路径表示的文件返回 codeDOM 树、编译器类型和编译器参数。Returns the codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.

重载

GenerateCodeCompileUnit(String, Type, CompilerParameters, IDictionary)

为按虚拟路径表示的文件返回 codeDOM 树、编译器类型和编译器参数。Returns the codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.

GenerateCodeCompileUnit(String, String, Type, CompilerParameters, IDictionary)

返回虚拟路径所表示的文件的内容、codeDOM 树、编译器类型和编译器参数。Returns the contents, codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.

GenerateCodeCompileUnit(String, Type, CompilerParameters, IDictionary)

为按虚拟路径表示的文件返回 codeDOM 树、编译器类型和编译器参数。Returns the codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.

public:
 System::CodeDom::CodeCompileUnit ^ GenerateCodeCompileUnit(System::String ^ virtualPath, [Runtime::InteropServices::Out] Type ^ % codeDomProviderType, [Runtime::InteropServices::Out] System::CodeDom::Compiler::CompilerParameters ^ % compilerParameters, [Runtime::InteropServices::Out] System::Collections::IDictionary ^ % linePragmasTable);
public System.CodeDom.CodeCompileUnit GenerateCodeCompileUnit (string virtualPath, out Type codeDomProviderType, out System.CodeDom.Compiler.CompilerParameters compilerParameters, out System.Collections.IDictionary linePragmasTable);
member this.GenerateCodeCompileUnit : string * Type * CompilerParameters * IDictionary -> System.CodeDom.CodeCompileUnit
Public Function GenerateCodeCompileUnit (virtualPath As String, ByRef codeDomProviderType As Type, ByRef compilerParameters As CompilerParameters, ByRef linePragmasTable As IDictionary) As CodeCompileUnit

参数

virtualPath
String

文件的虚拟路径。The virtual path to the file.

codeDomProviderType
Type

此方法返回时,包含用于代码生成和编译的 codeDOM 提供程序类型。When this method returns, contains the codeDOM provider type used for code generation and compilation.

compilerParameters
CompilerParameters

此方法返回时,包含定义如何编译文件的属性。When this method returns, contains the properties that define how the file will be compiled.

linePragmasTable
IDictionary

此方法返回时,包含一个行杂注的字典。When this method returns, contains a dictionary of line pragmas.

返回

给定文件的 CodeCompileUnitA CodeCompileUnit for the given file.

注解

GenerateCodeCompileUnit 方法检索编译文件所需的信息。The GenerateCodeCompileUnit method retrieves information needed to compile a file. 除了作为返回值的 CodeCompileUnit 对象之外,它还返回三个 out 参数。In addition to a CodeCompileUnit object as a return value, it returns three out parameters. codeDomProviderType 参数返回生成和编译文件的提供程序类型。The codeDomProviderType parameter returns the provider type for generating and compiling the file. compilerParameters 参数包含的属性用于确定编译行为。The compilerParameters parameter contains properties that determine compilation behavior. linePragmasTable 参数包含行杂注的字典。The linePragmasTable parameter contains a dictionary of line pragmas.

另请参阅

GenerateCodeCompileUnit(String, String, Type, CompilerParameters, IDictionary)

返回虚拟路径所表示的文件的内容、codeDOM 树、编译器类型和编译器参数。Returns the contents, codeDOM tree, compiler type, and compiler parameters for a file represented by a virtual path.

public:
 System::CodeDom::CodeCompileUnit ^ GenerateCodeCompileUnit(System::String ^ virtualPath, System::String ^ virtualFileString, [Runtime::InteropServices::Out] Type ^ % codeDomProviderType, [Runtime::InteropServices::Out] System::CodeDom::Compiler::CompilerParameters ^ % compilerParameters, [Runtime::InteropServices::Out] System::Collections::IDictionary ^ % linePragmasTable);
public System.CodeDom.CodeCompileUnit GenerateCodeCompileUnit (string virtualPath, string virtualFileString, out Type codeDomProviderType, out System.CodeDom.Compiler.CompilerParameters compilerParameters, out System.Collections.IDictionary linePragmasTable);
member this.GenerateCodeCompileUnit : string * string * Type * CompilerParameters * IDictionary -> System.CodeDom.CodeCompileUnit
Public Function GenerateCodeCompileUnit (virtualPath As String, virtualFileString As String, ByRef codeDomProviderType As Type, ByRef compilerParameters As CompilerParameters, ByRef linePragmasTable As IDictionary) As CodeCompileUnit

参数

virtualPath
String

文件的虚拟路径。The virtual path to the file.

virtualFileString
String

virtualPath 参数所表示的文件的内容。The contents of the file represented by the virtualPath parameter.

codeDomProviderType
Type

此方法返回时,包含用于代码生成和编译的 codeDOM 提供程序类型。When this method returns, contains the codeDOM provider type used for code generation and compilation.

compilerParameters
CompilerParameters

此方法返回时,包含一些属性,这些属性定义了 virtualPath 参数所表示的文件的编译方式。When this method returns, contains the properties that define how the file represented by the virtualPath parameter will be compiled.

linePragmasTable
IDictionary

此方法返回时,包含一个行杂注的字典。When this method returns, contains a dictionary of line pragmas.

返回

给定文件的 CodeCompileUnitA CodeCompileUnit for the given file.

异常

virtualPath 为 null。virtualPath is null.

注解

GenerateCodeCompileUnit 方法检索编译文件所需的信息。The GenerateCodeCompileUnit method retrieves information needed to compile a file. 除了作为返回值的 CodeCompileUnit 对象之外,它还返回三个 out 参数。In addition to a CodeCompileUnit object as a return value, it returns three out parameters. codeDomProviderType 参数返回生成和编译文件的提供程序类型。The codeDomProviderType parameter returns the provider type for generating and compiling the file. compilerParameters 参数包含的属性用于确定编译行为。The compilerParameters parameter contains properties that determine compilation behavior. linePragmasTable 参数包含行杂注的字典。The linePragmasTable parameter contains a dictionary of line pragmas.

另请参阅

适用于