MarshalByRefObject.GetLifetimeService 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
This Remoting API is not supported and throws PlatformNotSupportedException.
检索控制此实例的生存期策略的当前生存期服务对象。
public:
System::Object ^ GetLifetimeService();
public:
virtual System::Object ^ GetLifetimeService();
[System.Obsolete("This Remoting API is not supported and throws PlatformNotSupportedException.", DiagnosticId="SYSLIB0010", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public object GetLifetimeService ();
public object GetLifetimeService ();
[System.Security.SecurityCritical]
public object GetLifetimeService ();
[<System.Obsolete("This Remoting API is not supported and throws PlatformNotSupportedException.", DiagnosticId="SYSLIB0010", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.GetLifetimeService : unit -> obj
member this.GetLifetimeService : unit -> obj
abstract member GetLifetimeService : unit -> obj
override this.GetLifetimeService : unit -> obj
[<System.Security.SecurityCritical>]
abstract member GetLifetimeService : unit -> obj
override this.GetLifetimeService : unit -> obj
Public Function GetLifetimeService () As Object
返回
ILease 类型的对象,用于控制此实例的生存期策略。
- 属性
例外
直接调用方没有基础结构权限。
仅限 .NET Core 和 .NET 5 及更高版本:在所有情况下。
注解
从 .NET 5 开始,此方法标记为已过时。
有关生存期服务的信息,请参阅 LifetimeServices 类。