ApplicationManager 類別

定義

管理 ASP.NET 裝載應用程式的 ASP.NET 應用程式定義域。Manages ASP.NET application domains for an ASP.NET hosting application.

public ref class ApplicationManager sealed : MarshalByRefObject
public sealed class ApplicationManager : MarshalByRefObject
type ApplicationManager = class
    inherit MarshalByRefObject
Public NotInheritable Class ApplicationManager
Inherits MarshalByRefObject
繼承
ApplicationManager

備註

ApplicationManager物件會在 ASP.NET 應用程式的主控環境中提供物件的存留期管理。The ApplicationManager object provides lifetime management of objects in the hosting environment for an ASP.NET application. 它負責:It is responsible for:

  • 啟用和初始化 ASP.NET 應用程式。Activating and initializing ASP.NET applications.

  • 管理應用程式中已註冊之物件的應用程式存留期和存留期。Managing the application lifetime and the lifetime of objects registered in the application.

  • 公開主控環境用來處理 ASP.NET 應用程式要求的物件。Exposing objects used by the hosting environment to process ASP.NET application requests.

  • 提供在任何指定時間于主控進程中執行的應用程式清單。Providing a list of applications running in the hosting process at any given moment.

方法

Close()

關閉全部應用程式定義域。Shuts down all application domains.

CreateObject(IApplicationHost, Type)

依據類型,針對指定的應用程式定義域建立物件。Creates an object for the specified application domain, based on type.

CreateObject(String, Type, String, String, Boolean)

根據型別、虛擬路徑和實體路徑建立指定應用程式定義域的物件,如果指定型別的物件已存在,則會使用布林值 (Boolean) 表示失敗行為。Creates an object for the specified application domain based on type, virtual and physical paths, and a Boolean value indicating failure behavior when an object of the specified type already exists.

CreateObject(String, Type, String, String, Boolean, Boolean)

根據型別、虛擬路徑和實體路徑建立指定之應用程式定義域的物件,如果指定型別的物件已存在,則會使用布林值表示失敗行為,且布林值會指出是否擲回裝載初始設定錯誤例外狀況。Creates an object for the specified application domain based on type, virtual and physical paths, a Boolean value indicating failure behavior when an object of the specified type already exists, and a Boolean value indicating whether hosting initialization error exceptions are thrown.

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)
GetAppDomain(IApplicationHost)

使用指定的主機取得應用程式的應用程式定義域。Gets the application domain of an application using the specified host.

GetAppDomain(String)

取得指定之應用程式的應用程式定義域。Gets the application domain of the specified application.

GetApplicationManager()

傳回與這個 ASP.NET 主機處理序關聯之 ApplicationManager 物件的單一執行個體。Returns the single instance of the ApplicationManager object associated with this ASP.NET host process.

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)
GetObject(String, Type)

從指定應用程式傳回指定型別的註冊物件。Returns the registered object of the specified type from the specified application.

GetRunningApplications()

傳回執行應用程式的快照 (Snapshot)。Returns a snapshot of running applications.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
InitializeLifetimeService()

藉由防止建立使用期 (Lease),為應用程式定義域提供無限的存留期 (Lifetime)。Gives the application domain an infinite lifetime by preventing a lease from being created.

IsIdle()

傳回值,指出處理序所裝載 (Host) 的全部應用程式是否都在閒置 (Idle) 而未在處理要求。Returns a value indicating whether all applications hosted by the process are idle and not processing requests.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
MemberwiseClone(Boolean)

建立目前 MarshalByRefObject 物件的淺層複本。Creates a shallow copy of the current MarshalByRefObject object.

(繼承來源 MarshalByRefObject)
Open()

將應用程式管理員執行個體的使用者參考次數 (Reference Count) 進行安全執行緒遞增。Makes a thread-safe increment to the user reference count of the application manager instance.

ShutdownAll()

卸載全部應用程式資源。Unloads all application resources.

ShutdownApplication(String)

卸載指定的應用程式。Unloads the specified application.

StopObject(String, Type)

從應用程式的註冊物件清單中移除指定的物件。Removes the specified object from the list of registered objects in an application. 如果要移除的物件是應用程式之已註冊物件清單中的最後一個剩餘物件,則會卸載該應用程式。If the object to be removed is the last remaining object in the list of registered objects in an application, the application is unloaded.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於