WindowsServiceLifetimeHostBuilderExtensions 類別

定義

用於設定 WindowsServiceLifetime 的擴充方法。

public ref class WindowsServiceLifetimeHostBuilderExtensions abstract sealed
public static class WindowsServiceLifetimeHostBuilderExtensions
type WindowsServiceLifetimeHostBuilderExtensions = class
Public Module WindowsServiceLifetimeHostBuilderExtensions
繼承
WindowsServiceLifetimeHostBuilderExtensions

方法

AddWindowsService(IServiceCollection)

用於設定 WindowsServiceLifetime 的擴充方法。

AddWindowsService(IServiceCollection, Action<WindowsServiceLifetimeOptions>)

用於設定 WindowsServiceLifetime 的擴充方法。

UseWindowsService(IHostBuilder)

將主機存留期設定為 WindowsServiceLifetime、設定內容根目錄,以及啟用記錄至事件記錄檔功能,並以應用程式名稱作為預設來源名稱。

UseWindowsService(IHostBuilder, Action<WindowsServiceLifetimeOptions>)

用於設定 WindowsServiceLifetime 的擴充方法。

適用於