MarshalByRefObject.GetLifetimeService MarshalByRefObject.GetLifetimeService MarshalByRefObject.GetLifetimeService MarshalByRefObject.GetLifetimeService Method

定義

擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

public:
 virtual System::Object ^ GetLifetimeService();
[System.Security.SecurityCritical]
public object GetLifetimeService ();
abstract member GetLifetimeService : unit -> obj
override this.GetLifetimeService : unit -> obj
Public Function GetLifetimeService () As Object

傳回

型別 ILease 的物件,用來控制這個執行個體的存留期原則。An object of type ILease used to control the lifetime policy for this instance.

例外狀況

立即呼叫端沒有基礎結構使用權限。The immediate caller does not have infrastructure permission.

備註

如需生命週期服務的詳細資訊, LifetimeServices請參閱類別。For more information about lifetime services, see the LifetimeServices class.

安全性

SecurityCriticalAttribute
需要完全信任立即呼叫者。requires full trust for the immediate caller. 部分信任或透明的程式碼無法使用這個成員。This member cannot be used by partially trusted or transparent code.

適用於