namespace Evergreen.Health.Application.Health.Integrations.Ib43; public interface IIb43ReportSink { Task SaveAsync(string reportId, Ib43Binding binding, Ib43Report report, CancellationToken token); } public sealed class Ib43ReportSink(IServiceScopeFactory scopes) : IIb43ReportSink { public async Task SaveAsync(string reportId, Ib43Binding binding, Ib43Report report, CancellationToken token) { token.ThrowIfCancellationRequested(); using var scope = scopes.CreateScope(); return await scope.ServiceProvider.GetRequiredService().Save(reportId, binding, report); } }