ClientBuildManager 類別

定義

提供 ASP.NET 應用程式的編譯 (Compilation) 服務。

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 應用程式的方法和屬性,以及擷取產生的元件或產生的原始程式碼。 類別的實例會在用戶端的應用程式域中建立,並提供 ASP.NET 建置系統Microsoft Internet Information Services (IIS 外部) 的存取權。 類別可用來開發用於編譯 Web 應用程式的自訂工具。

命令列工具 aspnet_compiler 會使用 ClientBuildManager 類別。

建構函式

ClientBuildManager(String, String)

初始化 ClientBuildManager 類別的新執行個體,而不使用指定的目標目錄或先行編譯旗標。

ClientBuildManager(String, String, String)

使用指定的目標目錄,初始化 ClientBuildManager 類別的新執行個體。

ClientBuildManager(String, String, String, ClientBuildManagerParameter)

使用指定的目標目錄和編譯參數,初始化 ClientBuildManager 類別的新執行個體。

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

使用指定的虛擬目錄、來源目錄、目標目錄、編譯參數和型別描述提供者,初始化 ClientBuildManager 類別的新執行個體。

屬性

CodeGenDir

取得用於產生程式碼的目錄之實體路徑。

IsHostCreated

取得值,指出是否已建立編譯 ASP.NET Web 應用程式的應用程式定義域。

方法

CompileApplicationDependencies()

編譯與應用程式相關的檔案,例如 App_Code 目錄中的檔案、Global.asax 檔案、資源檔案,以及 Web 參考。

CompileFile(String)

編譯由虛擬路徑表示的檔案。

CompileFile(String, ClientBuildManagerCallback)

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

CreateObject(Type, Boolean)

在 ASP.NET 執行階段的應用程式定義域中建立物件。

CreateObjRef(Type)

建立包含所有相關資訊的物件,這些資訊是產生用來與遠端物件通訊的所需 Proxy。

(繼承來源 MarshalByRefObject)
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GenerateCode(String, String, IDictionary)

從檔案的內容產生程式碼。

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

傳回由虛擬路徑表示的檔案之內容、codeDOM 樹狀、編譯器型別和編譯器參數。

GenerateCodeCompileUnit(String, Type, CompilerParameters, IDictionary)

傳回由虛擬路徑表示的檔案之 codeDOM 樹狀、編譯器型別和編譯器參數。

GetAppDomainShutdownDirectories()

取得目錄,其中含有當變更時會導致應用程式定義域關閉的檔案。

GetBrowserDefinitions()

取得瀏覽器項目的集合。

GetCodeDirectoryInformation(String, Type, CompilerParameters, String)

取得編譯器型別、編譯器參數,以及儲存從非程式碼檔案 (例如 .wsdl 檔案) 產生的程式碼檔案之目錄等相關資訊。

GetCompiledType(String)

編譯由虛擬路徑表示的檔案,並傳回其編譯型別。

GetCompilerParameters(String, Type, CompilerParameters)

傳回編譯器型別和參數,用來建置由虛擬路徑表示的檔案。

GetGeneratedFileVirtualPath(String)

傳回產生的檔案之虛擬路徑。

GetGeneratedSourceFile(String)

取得虛擬路徑的產生檔案之實體路徑。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetLifetimeService()
已淘汰.

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。

(繼承來源 MarshalByRefObject)
GetTopLevelAssemblyReferences(String)

傳回在 Bin 目錄和 Web 組態檔之 <assembly> 區段中所定義的組件陣列。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
GetVirtualCodeDirectories()

傳回 ASP.NET 應用程式中 App_Code 目錄及其子目錄的虛擬路徑。

InitializeLifetimeService()

藉由防止建立使用期 (Lease),為應用程式定義域提供無限的存留期 (Lifetime)。

IsCodeAssembly(String)

指出組件是否為程式碼組件。

MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。

(繼承來源 MarshalByRefObject)
PrecompileApplication()

先行編譯 ASP.NET 應用程式。

PrecompileApplication(ClientBuildManagerCallback)

先行編譯 ASP.NET 應用程式,並提供回呼方法以接收關於組建的狀態資訊。

PrecompileApplication(ClientBuildManagerCallback, Boolean)

先行編譯 ASP.NET 應用程式,提供回呼方法以接收組建相關的狀態資訊,並指出是否建立全新的組建。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)
Unload()

卸載編譯 ASP.NET Web 應用程式的應用程式定義域。

事件

AppDomainShutdown

在應用程式定義域關閉時發生。

AppDomainStarted

在應用程式定義域啟動時發生。

AppDomainUnloaded

在應用程式定義域卸載時發生。

明確介面實作

IDisposable.Dispose()

終止目前的 ASP.NET 應用程式。

適用於

另請參閱