ClientBuildManager 類別

定義

提供 ASP.NET 應用程式的編譯 (Compilation) 服務。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_compilerClientBuildManager使用類別。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)

編譯由虛擬路徑表示的檔案,並提供回呼 (Callback) 類別以接收關於組建 (Build) 的狀態資訊。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)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。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()

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。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()

藉由防止建立使用期 (Lease),為應用程式定義域提供無限的存留期 (Lifetime)。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 的淺層複本 (Shallow Copy)。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.

適用於

另請參閱