WindowsServiceLifetimeHostBuilderExtensions.UseWindowsService メソッド

定義

オーバーロード

名前 説明
UseWindowsService(IHostBuilder)

ホストの有効期間を WindowsServiceLifetime に設定し、アプリケーション名を既定のソース名として使用してイベント ログにログを記録できるようにします。

UseWindowsService(IHostBuilder, Action<WindowsServiceLifetimeOptions>)

ホストの有効期間を WindowsServiceLifetime に設定し、アプリケーション名を既定のソース名として使用してイベント ログにログを記録できるようにします。

UseWindowsService(IHostBuilder)

ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs
ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs
ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs
ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs

ホストの有効期間を WindowsServiceLifetime に設定し、アプリケーション名を既定のソース名として使用してイベント ログにログを記録できるようにします。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ UseWindowsService(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder);
public static Microsoft.Extensions.Hosting.IHostBuilder UseWindowsService(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder);
static member UseWindowsService : Microsoft.Extensions.Hosting.IHostBuilder -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseWindowsService (hostBuilder As IHostBuilder) As IHostBuilder

パラメーター

hostBuilder
IHostBuilder

操作する IHostBuilder

返品

チェーン用の hostBuilder インスタンス。

注釈

これはコンテキスト対応であり、プロセスが Windows サービスとして実行されていることが検出された場合にのみアクティブになります。

適用対象

UseWindowsService(IHostBuilder, Action<WindowsServiceLifetimeOptions>)

ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs
ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs
ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs
ソース:
WindowsServiceLifetimeHostBuilderExtensions.cs

ホストの有効期間を WindowsServiceLifetime に設定し、アプリケーション名を既定のソース名として使用してイベント ログにログを記録できるようにします。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ UseWindowsService(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Hosting::WindowsServiceLifetimeOptions ^> ^ configure);
public static Microsoft.Extensions.Hosting.IHostBuilder UseWindowsService(this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.WindowsServiceLifetimeOptions> configure);
static member UseWindowsService : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.WindowsServiceLifetimeOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseWindowsService (hostBuilder As IHostBuilder, configure As Action(Of WindowsServiceLifetimeOptions)) As IHostBuilder

パラメーター

hostBuilder
IHostBuilder

操作する IHostBuilder

configure
Action<WindowsServiceLifetimeOptions>

指定されたAction<T>を構成するためのWindowsServiceLifetimeOptions

返品

チェーン用の hostBuilder インスタンス。

注釈

これはコンテキスト対応であり、プロセスが Windows サービスとして実行されていることが検出された場合にのみアクティブになります。

適用対象