MarshalByRefObject.GetLifetimeService 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This Remoting API is not supported and throws PlatformNotSupportedException.
擷取控制這個執行個體存留期 (Lifetime) 原則的目前存留期服務物件。
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 |