ConsoleLifetime Class
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.
Listens for Ctrl+C or SIGTERM and initiates shutdown.
public ref class ConsoleLifetime : IDisposable, Microsoft::Extensions::Hosting::IHostLifetime
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public class ConsoleLifetime : IDisposable, Microsoft.Extensions.Hosting.IHostLifetime
public class ConsoleLifetime : IDisposable, Microsoft.Extensions.Hosting.IHostLifetime
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
type ConsoleLifetime = class
interface IHostLifetime
interface IDisposable
type ConsoleLifetime = class
interface IHostLifetime
interface IDisposable
Public Class ConsoleLifetime
Implements IDisposable, IHostLifetime
- Inheritance
-
ConsoleLifetime
- Attributes
- Implements
This API supports the .NET infrastructure and is not intended to be used directly from your code.
Console |
Initializes a ConsoleLifetime instance using the specified console lifetime options, host environment, host options and logger factory. |
Console |
Initializes a ConsoleLifetime instance using the specified console lifetime options, host environment, host application lifetime and host options. |
Dispose() |
Unregisters the shutdown handlers and disposes the application start and application stop registrations. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Stop |
This method does nothing. |
To |
Returns a string that represents the current object. (Inherited from Object) |
Wait |
Registers the application start, application stop and shutdown handlers for this application. |
Produkt | Verze |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Zpětná vazba k produktu .NET
.NET je open source projekt. Vyberte odkaz pro poskytnutí zpětné vazby: