MarshalByRefObject.GetLifetimeService Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
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
Returns
An object of type ILease used to control the lifetime policy for this instance.
- Attributes
Exceptions
The immediate caller does not have infrastructure permission.
.NET Core and .NET 5+ only: In all cases.
Remarks
This method is marked obsolete starting in .NET 5.
For more information about lifetime services, see the LifetimeServices class.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈