WebHostService Třída

Definice

Poskytuje implementaci služby systému Windows, která hostuje ASP.NET Core.

public ref class WebHostService : System::ServiceProcess::ServiceBase
public class WebHostService : System.ServiceProcess.ServiceBase
type WebHostService = class
    inherit ServiceBase
Public Class WebHostService
Inherits ServiceBase
Dědičnost
WebHostService

Konstruktory

WebHostService(IWebHost)

Vytvoří instanci WebHostService , která hostuje zadanou webovou aplikaci.

Metody

OnStart(String[])

When implemented in a derived class, executes when a Start command is sent to the service by the Service Control Manager (SCM) or when the operating system starts (for a service that starts automatically). Specifies actions to take when the service starts.

OnStarted()

Spustí se po spuštění ASP.NET Core.

OnStarting(String[])

Spustí se před spuštěním ASP.NET Core.

OnStop()

When implemented in a derived class, executes when a Stop command is sent to the service by the Service Control Manager (SCM). Specifies actions to take when a service stops running.

OnStopped()

Spustí se po vypnutí ASP.NET Core.

OnStopping()

Spustí se před vypnutím ASP.NET Core.

Platí pro