Class ApplicationAuditCompletionOutboxHostedService
- Namespace
- ProjectTemplate.Web.Services
- Assembly
- ProjectTemplate.Web.dll
Dispatches durable audit-completion entries after their originating transaction commits.
public sealed class ApplicationAuditCompletionOutboxHostedService : BackgroundService, IHostedService, IDisposable
- Inheritance
-
ApplicationAuditCompletionOutboxHostedService
- Implements
- Inherited Members
Constructors
ApplicationAuditCompletionOutboxHostedService(IServiceScopeFactory, IOptions<ApplicationAuditCompletionOutboxOptions>, TimeProvider, ILogger<ApplicationAuditCompletionOutboxHostedService>)
Dispatches durable audit-completion entries after their originating transaction commits.
public ApplicationAuditCompletionOutboxHostedService(IServiceScopeFactory scopeFactory, IOptions<ApplicationAuditCompletionOutboxOptions> options, TimeProvider timeProvider, ILogger<ApplicationAuditCompletionOutboxHostedService> logger)
Parameters
scopeFactoryIServiceScopeFactoryoptionsIOptions<ApplicationAuditCompletionOutboxOptions>timeProviderTimeProviderloggerILogger<ApplicationAuditCompletionOutboxHostedService>
Methods
ExecuteAsync(CancellationToken)
This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.
protected override Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingTokenCancellationTokenTriggered when StopAsync(CancellationToken) is called.
Returns
Remarks
See Worker Services in .NET for implementation guidelines.