This commit is contained in:
fuenmao
2026-11-11 16:11:41 +08:00
parent 3ca90c4cf3
commit 61e25175db
39 changed files with 2176 additions and 31 deletions
@@ -0,0 +1,16 @@
namespace Evergreen.Health.Application.Health.Integrations.Ib43;
public interface IIb43ReportSink
{
Task<Ib43SavedReport> SaveAsync(string reportId, Ib43Binding binding, Ib43Report report, CancellationToken token);
}
public sealed class Ib43ReportSink(IServiceScopeFactory scopes) : IIb43ReportSink
{
public async Task<Ib43SavedReport> SaveAsync(string reportId, Ib43Binding binding, Ib43Report report, CancellationToken token)
{
token.ThrowIfCancellationRequested();
using var scope = scopes.CreateScope();
return await scope.ServiceProvider.GetRequiredService<Ib43DataRepository>().Save(reportId, binding, report);
}
}