Class LogUtilHostedService
Initiates the LogUtil upon startup
Inheritance
System.Object
LogUtilHostedService
Implements
Microsoft.Extensions.Hosting.IHostedService
Namespace: ImageVault.Common.Extensions.DependencyInjection
Assembly: ImageVault.Common.dll
Syntax
public class LogUtilHostedService : Object
Constructors
LogUtilHostedService(IHostApplicationLifetime, ILogger<LogUtilHostedService>, LogUtil)
Creates the service
Declaration
public LogUtilHostedService(IHostApplicationLifetime applicationLifetime, ILogger<LogUtilHostedService> logger, LogUtil logUtil)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Hosting.IHostApplicationLifetime | applicationLifetime | |
Microsoft.Extensions.Logging.ILogger<LogUtilHostedService> | logger | |
LogUtil | logUtil |
Methods
StartAsync(CancellationToken)
Declaration
public Task StartAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
StopAsync(CancellationToken)
Declaration
public Task StopAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Implements
Microsoft.Extensions.Hosting.IHostedService