1111
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user