WindowsServiceLifetimeHostBuilderExtensions 类
定义
用于设置 WindowsServiceLifetime 的扩展方法。Extension methods for setting up WindowsServiceLifetime.
public ref class WindowsServiceLifetimeHostBuilderExtensions abstract sealed
public static class WindowsServiceLifetimeHostBuilderExtensions
type WindowsServiceLifetimeHostBuilderExtensions = class
Public Module WindowsServiceLifetimeHostBuilderExtensions
- 继承
-
WindowsServiceLifetimeHostBuilderExtensions
方法
| UseWindowsService(IHostBuilder) |
将主机生存期设置为 WindowsServiceLifetime,设置内容根,启用事件日志记录,并将应用程序名称作为默认源名称。Sets the host lifetime to WindowsServiceLifetime, sets the Content Root, and enables logging to the event log with the application name as the default source name. |