WindowsServiceLifetimeHostBuilderExtensions 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
用於設定 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 的擴充方法。 |
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應