| | | 1 | | using ProjectTemplate.Infrastructure.Data.Auditing; |
| | | 2 | | using ProjectTemplate.Infrastructure.Data.Extensions; |
| | | 3 | | using ProjectTemplate.Web.HealthChecks; |
| | | 4 | | using ProjectTemplate.Web.Services; |
| | | 5 | | |
| | | 6 | | namespace ProjectTemplate.Web.Extensions; |
| | | 7 | | |
| | | 8 | | public static class ApplicationAuditReconciliationServiceExtensions |
| | | 9 | | { |
| | | 10 | | public static IServiceCollection AddApplicationAuditReconciliation( |
| | | 11 | | this IServiceCollection services, |
| | | 12 | | Action<ApplicationAuditReconciliationOptions>? configure = null) |
| | | 13 | | { |
| | 0 | 14 | | ArgumentNullException.ThrowIfNull(services); |
| | | 15 | | |
| | 0 | 16 | | services.AddApplicationAuditReconciliationCore(configure); |
| | 0 | 17 | | services.AddHostedService<ApplicationAuditReconciliationHostedService>(); |
| | 0 | 18 | | services.AddHealthChecks() |
| | 0 | 19 | | .AddCheck<ApplicationAuditIntegrityHealthCheck>( |
| | 0 | 20 | | "application-audit-integrity", |
| | 0 | 21 | | tags: ["ready", "audit", "integrity"]); |
| | 0 | 22 | | return services; |
| | | 23 | | } |
| | | 24 | | } |