次の方法で共有


WindowsServiceLifetime コンストラクター

定義

オーバーロード

WindowsServiceLifetime(IHostEnvironment, IHostApplicationLifetime, ILoggerFactory, IOptions<HostOptions>)

新しい WindowsServiceLifetime インスタンスを初期化します。

WindowsServiceLifetime(IHostEnvironment, IHostApplicationLifetime, ILoggerFactory, IOptions<HostOptions>, IOptions<WindowsServiceLifetimeOptions>)

WindowsServiceLifetime クラスの新しいインスタンスを初期化します。

WindowsServiceLifetime(IHostEnvironment, IHostApplicationLifetime, ILoggerFactory, IOptions<HostOptions>)

ソース:
WindowsServiceLifetime.cs
ソース:
WindowsServiceLifetime.cs
ソース:
WindowsServiceLifetime.cs

新しい WindowsServiceLifetime インスタンスを初期化します。

public:
 WindowsServiceLifetime(Microsoft::Extensions::Hosting::IHostEnvironment ^ environment, Microsoft::Extensions::Hosting::IHostApplicationLifetime ^ applicationLifetime, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Hosting::HostOptions ^> ^ optionsAccessor);
public WindowsServiceLifetime (Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> optionsAccessor);
new Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime : Microsoft.Extensions.Hosting.IHostEnvironment * Microsoft.Extensions.Hosting.IHostApplicationLifetime * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> -> Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime
Public Sub New (environment As IHostEnvironment, applicationLifetime As IHostApplicationLifetime, loggerFactory As ILoggerFactory, optionsAccessor As IOptions(Of HostOptions))

パラメーター

environment
IHostEnvironment

ホストに関する情報。

applicationLifetime
IHostApplicationLifetime

サービスの有効期間を追跡する IHostApplicationLifetime

loggerFactory
ILoggerFactory

ILoggerFactory 有効期間ロガーのインスタンス化に使用されます。

optionsAccessor
IOptions<HostOptions>

サービスのオプションを含む IOptions<TOptions>

適用対象

WindowsServiceLifetime(IHostEnvironment, IHostApplicationLifetime, ILoggerFactory, IOptions<HostOptions>, IOptions<WindowsServiceLifetimeOptions>)

ソース:
WindowsServiceLifetime.cs
ソース:
WindowsServiceLifetime.cs
ソース:
WindowsServiceLifetime.cs

WindowsServiceLifetime クラスの新しいインスタンスを初期化します。

public:
 WindowsServiceLifetime(Microsoft::Extensions::Hosting::IHostEnvironment ^ environment, Microsoft::Extensions::Hosting::IHostApplicationLifetime ^ applicationLifetime, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Hosting::HostOptions ^> ^ optionsAccessor, Microsoft::Extensions::Options::IOptions<Microsoft::Extensions::Hosting::WindowsServiceLifetimeOptions ^> ^ windowsServiceOptionsAccessor);
public WindowsServiceLifetime (Microsoft.Extensions.Hosting.IHostEnvironment environment, Microsoft.Extensions.Hosting.IHostApplicationLifetime applicationLifetime, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> optionsAccessor, Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.WindowsServiceLifetimeOptions> windowsServiceOptionsAccessor);
new Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime : Microsoft.Extensions.Hosting.IHostEnvironment * Microsoft.Extensions.Hosting.IHostApplicationLifetime * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.HostOptions> * Microsoft.Extensions.Options.IOptions<Microsoft.Extensions.Hosting.WindowsServiceLifetimeOptions> -> Microsoft.Extensions.Hosting.WindowsServices.WindowsServiceLifetime
Public Sub New (environment As IHostEnvironment, applicationLifetime As IHostApplicationLifetime, loggerFactory As ILoggerFactory, optionsAccessor As IOptions(Of HostOptions), windowsServiceOptionsAccessor As IOptions(Of WindowsServiceLifetimeOptions))

パラメーター

environment
IHostEnvironment

ホストに関する情報。

applicationLifetime
IHostApplicationLifetime

サービスの有効期間を追跡する IHostApplicationLifetime

loggerFactory
ILoggerFactory

ILoggerFactory 有効期間ロガーのインスタンス化に使用されます。

optionsAccessor
IOptions<HostOptions>

サービスのオプションを含む IOptions<TOptions>

windowsServiceOptionsAccessor
IOptions<WindowsServiceLifetimeOptions>

サービス名の検索に使用する Windows サービス オプション。

適用対象