Table of Contents

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

scopeFactory IServiceScopeFactory
options IOptions<ApplicationAuditCompletionOutboxOptions>
timeProvider TimeProvider
logger ILogger<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

stoppingToken CancellationToken

Triggered when StopAsync(CancellationToken) is called.

Returns

Task

A Task that represents the long running operations.

Remarks

See Worker Services in .NET for implementation guidelines.