AppDomain.InitializeLifetimeService 方法

定义

通过防止创建租约来给予 AppDomain 无限生存期。Gives the AppDomain an infinite lifetime by preventing a lease from being created.

public:
 override System::Object ^ InitializeLifetimeService();
[System.Security.SecurityCritical]
public override object InitializeLifetimeService ();
override this.InitializeLifetimeService : unit -> obj
Public Overrides Function InitializeLifetimeService () As Object

返回

总是为 nullAlways null.

实现

属性

异常

在卸载的应用程序域上尝试该操作。The operation is attempted on an unloaded application domain.

安全性

SecurityCriticalAttribute
需要对直接调用方的完全信任。requires full trust for the immediate caller. 部分受信任的或透明的代码不能使用此成员。This member cannot be used by partially trusted or transparent code.

适用于