MarshalByRefObject.GetLifetimeService Método

Definição

Cuidado

This Remoting API is not supported and throws PlatformNotSupportedException.

Recupera o objeto de serviço de tempo de vida atual que controla a política de ciclo de vida para esta instância.Retrieves the current lifetime service object that controls the lifetime policy for this instance.

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

Retornos

Object

Um objeto do tipo ILease usado para controlar a política de tempo de vida para esta instância.An object of type ILease used to control the lifetime policy for this instance.

Atributos

Exceções

O chamador imediato não tem permissão de infraestrutura.The immediate caller does not have infrastructure permission.

Somente .NET Core e .NET 5+: Em todos os casos..NET Core and .NET 5+ only: In all cases.

Comentários

Esse método está marcado como obsoleto a partir do .NET 5,0.This method is marked obsolete starting in .NET 5.0.

Para obter mais informações sobre serviços de vida útil, consulte a LifetimeServices classe.For more information about lifetime services, see the LifetimeServices class.

Aplica-se a