Udostępnij za pośrednictwem


WindowsServiceLifetime Konstruktory

Definicja

Przeciążenia

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

Inicjuje nowe wystąpienie WindowsServiceLifetime.

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

Inicjuje nowe wystąpienie klasy WindowsServiceLifetime.

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

Źródło:
WindowsServiceLifetime.cs
Źródło:
WindowsServiceLifetime.cs
Źródło:
WindowsServiceLifetime.cs

Inicjuje nowe wystąpienie 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))

Parametry

environment
IHostEnvironment

Informacje o hoście.

applicationLifetime
IHostApplicationLifetime

IHostApplicationLifetime, który śledzi okres istnienia usługi.

loggerFactory
ILoggerFactory

ILoggerFactory używane do tworzenia wystąpienia rejestratora okresu istnienia.

optionsAccessor
IOptions<HostOptions>

IOptions<TOptions> zawierające opcje usługi.

Dotyczy

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

Źródło:
WindowsServiceLifetime.cs
Źródło:
WindowsServiceLifetime.cs
Źródło:
WindowsServiceLifetime.cs

Inicjuje nowe wystąpienie klasy 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))

Parametry

environment
IHostEnvironment

Informacje o hoście.

applicationLifetime
IHostApplicationLifetime

IHostApplicationLifetime, który śledzi okres istnienia usługi.

loggerFactory
ILoggerFactory

ILoggerFactory używane do tworzenia wystąpienia rejestratora okresu istnienia.

optionsAccessor
IOptions<HostOptions>

IOptions<TOptions> zawierające opcje usługi.

windowsServiceOptionsAccessor
IOptions<WindowsServiceLifetimeOptions>

Opcje usługi systemu Windows używane do znajdowania nazwy usługi.

Dotyczy