MarshalByRefObject.GetLifetimeService 方法

定义

检索控制此实例的生存期策略的当前生存期服务对象。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.

适用于