MarshalByRefObject.GetLifetimeService メソッド

定義

注意事項

This Remoting API is not supported and throws PlatformNotSupportedException.

対象のインスタンスの有効期間ポリシーを制御する、現在の有効期間サービス オブジェクトを取得します。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

戻り値

Object

対象のインスタンスの有効期間ポリシーを制御するときに使用する、ILease 型のオブジェクト。An object of type ILease used to control the lifetime policy for this instance.

属性

例外

直前の呼び出し元に、インフラストラクチャ アクセス許可がありません。The immediate caller does not have infrastructure permission.

.NET Core および .NET 5 以降のみ:すべての場合。.NET Core and .NET 5+ only: In all cases.

注釈

このメソッドは、.NET 5.0 以降、古い形式に設定されています。This method is marked obsolete starting in .NET 5.0.

有効期間サービスの詳細については、クラスを参照してください LifetimeServicesFor more information about lifetime services, see the LifetimeServices class.

適用対象