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 的扩展方法。

适用于