ClientBuildManager 类

定义

为 ASP.NET 应用程序提供编译服务。Provides compilation services for ASP.NET applications.

public ref class ClientBuildManager sealed : MarshalByRefObject, IDisposable
public sealed class ClientBuildManager : MarshalByRefObject, IDisposable
type ClientBuildManager = class
    inherit MarshalByRefObject
    interface IDisposable
Public NotInheritable Class ClientBuildManager
Inherits MarshalByRefObject
Implements IDisposable
继承
ClientBuildManager
实现

注解

ClientBuildManager 类提供用于编译 ASP.NET Web 应用程序、检索生成的程序集或生成的源代码的方法和属性。The ClientBuildManager class offers methods and properties for compiling ASP.NET Web applications, and retrieving the generated assemblies or generated source code. 类的实例在客户端的应用程序域中建立,并提供对 Microsoft Internet Information Services (IIS)以外的 ASP.NET 生成系统的访问权限。Instances of the class are established in the client's application domain and provide access to the ASP.NET build system outside of Microsoft Internet Information Services (IIS). 类可用于开发自定义用于编译 Web 应用程序的工具。The class can be used to develop customized tools for compiling Web applications.

aspnet_compiler 使用 ClientBuildManager 类的命令行工具。The command-line tool aspnet_compiler uses the ClientBuildManager class.

构造函数

ClientBuildManager(String, String)

在不指定目标目录或预编译标志的情况下初始化 ClientBuildManager 类的新实例。Initializes a new instance of the ClientBuildManager class without a specified target directory or precompilation flags.

ClientBuildManager(String, String, String)

使用指定的目标目录初始化 ClientBuildManager 类的新实例。Initializes a new instance of the ClientBuildManager class with the specified target directory.

ClientBuildManager(String, String, String, ClientBuildManagerParameter)

使用指定的目标目录和编译参数初始化 ClientBuildManager 类的新实例。Initializes a new instance of the ClientBuildManager class with the specified target directory and compilation parameter.

ClientBuildManager(String, String, String, ClientBuildManagerParameter, TypeDescriptionProvider)

使用指定的虚拟目录、源目录、目标目录、编译参数和类型说明提供程序初始化 ClientBuildManager 类的新实例。Initializes a new instance of the ClientBuildManager class by using the specified virtual directory, source directory, target directory, compilation parameter, and type-description provider.

属性

CodeGenDir

获取用于代码生成的目录的物理路径。Gets the physical path to the directory used for code generation.

IsHostCreated

获取一个值,该值指出用于编译 ASP.NET Web 应用程序的应用程序域是否已经创建。Gets a value that indicates whether an application domain for compiling ASP.NET Web applications has been created.

方法

CompileApplicationDependencies()

编译与应用程序相关的文件,例如,App_Code 目录中的文件、Global.asax 文件、资源文件和 Web 引用。Compiles application-dependent files, such as files in the App_Code directory, the Global.asax file, resource files, and Web references.

CompileFile(String)

编译按虚拟路径表示的文件。Compiles the file represented by the virtual path.

CompileFile(String, ClientBuildManagerCallback)

编译由虚拟路径表示的文件,并提供一个回调类来接收有关生成的状态信息。Compiles the file represented by the virtual path and provides a callback class to receive status information about the build.

CreateObject(Type, Boolean)

在 ASP.NET 运行时的应用程序域中创建一个对象。Creates an object in the application domain of the ASP.NET runtime.

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GenerateCode(String, String, IDictionary)

根据文件内容生成代码。Generates code from the contents of a file.

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.

GetAppDomainShutdownDirectories()

获取包含特定文件的目录,这些文件如果更改,会导致应用程序域关闭。Gets the directories with files that, when changed, cause the application domain to shut down.

GetBrowserDefinitions()

获取浏览器元素的集合。Gets a collection of browser elements.

GetCodeDirectoryInformation(String, Type, CompilerParameters, String)

获取与编译器类型、编译器参数以及用来存储根据非代码文件(如 .wsdl 文件)生成的代码文件的目录有关的信息。Gets information about the compiler type, compiler parameters, and the directory in which to store code files generated from non-code files such as .wsdl files.

GetCompiledType(String)

编译由虚拟路径表示的文件,并返回其编译类型。Compiles the file represented by the virtual path and returns its compiled type.

GetCompilerParameters(String, Type, CompilerParameters)

返回用来生成虚拟路径所表示的文件的编译器类型和参数。Returns the compiler type and parameters that are used to build a file represented by a virtual path.

GetGeneratedFileVirtualPath(String)

返回所生成文件的虚拟路径。Returns the virtual path of a generated file.

GetGeneratedSourceFile(String)

获取虚拟路径的生成文件的物理路径。Gets the physical path to the generated file for a virtual path.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetTopLevelAssemblyReferences(String)

返回 Bin 目录和 Web 配置文件的 <assembly> 节中定义的程序集的数组。Returns an array of the assemblies defined in the Bin directory and the <assembly> section of the Web configuration file.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetVirtualCodeDirectories()

返回 ASP.NET 应用程序中 App_Code 目录及其子目录的虚拟路径。Returns the virtual paths to the App_Code directory and its subdirectories in an ASP.NET application.

InitializeLifetimeService()

通过防止创建租约来给予应用程序域无限生存期。Gives the application domain an infinite lifetime by preventing a lease from being created.

IsCodeAssembly(String)

指示程序集是否为代码程序集。Indicates whether an assembly is a code assembly.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
PrecompileApplication()

预编译 ASP.NET 应用程序。Precompiles an ASP.NET application.

PrecompileApplication(ClientBuildManagerCallback)

预编译 ASP.NET 应用程序,并提供回调方法来接收有关生成的状态信息。Precompiles an ASP.NET application and provides a callback method to receive status information about the build.

PrecompileApplication(ClientBuildManagerCallback, Boolean)

预编译 ASP.NET 应用程序,提供回调方法以接收有关生成的状态信息,并指示是否创建干净生成。Precompiles an ASP.NET application, provides a callback method to receive status information about the build, and indicates whether to create a clean build.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)
Unload()

卸载用于编译 ASP.NET Web 应用程序的应用程序域。Unloads the application domain for compiling ASP.NET Web applications.

事件

AppDomainShutdown

在应用程序域关闭时发生。Occurs when an application domain is shut down.

AppDomainStarted

在应用程序域启动时发生。Occurs when an application domain is started.

AppDomainUnloaded

在应用程序域卸载时发生。Occurs when an application domain is unloaded.

显式接口实现

IDisposable.Dispose()

终止当前 ASP.NET 应用程序。Terminates the current ASP.NET application.

适用于

另请参阅