using Microsoft.Extensions.DependencyInjection;
namespace ZB.MOM.WW.ScadaBridge.SiteCallAudit;
///
/// Composition root for the Site Call Audit (#22) component.
///
///
///
/// Binds (stuck-call detection + KPI
/// windowing for the read-side query/KPI handlers). The reconciliation puller
/// and central→site Retry/Discard relay are still deferred to later follow-ups.
///
///
/// The repository (ISiteCallAuditRepository) is registered by
/// ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.ServiceCollectionExtensions.AddConfigurationDatabase,
/// so callers (the Host on the central node) must also call that. The actor's
/// Props are wired up in Host registration.
///
///
public static class ServiceCollectionExtensions
{
/// Configuration section bound to .
public const string OptionsSection = "ScadaBridge:SiteCallAudit";
///
/// Registers Site Call Audit (#22) services: the
/// binding consumed by the actor's read-side KPI/query handlers. The actor's
/// Props are still constructed inline in Host wiring.
///
/// The service collection to register into.
/// The same collection, for chaining.
public static IServiceCollection AddSiteCallAudit(this IServiceCollection services)
{
ArgumentNullException.ThrowIfNull(services);
services.AddOptions()
.BindConfiguration(OptionsSection);
return services;
}
}