MarshalByRefObject.GetLifetimeService 方法
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
This Remoting API is not supported and throws PlatformNotSupportedException.
检索控制此实例的生存期策略的当前生存期服务对象。
public:
System::Object ^ GetLifetimeService();
public:
virtual System::Object ^ GetLifetimeService();
C#
[System.Obsolete("This Remoting API is not supported and throws PlatformNotSupportedException.", DiagnosticId="SYSLIB0010", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public object GetLifetimeService ();
C#
public object GetLifetimeService ();
C#
[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 类。
产品 | 版本 (已过时) |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 7 (5, 6) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
.NET Standard | 2.0, 2.1 |