Implement result getter

This commit is contained in:
2025-11-01 19:15:07 +09:00
parent 6fc2db95ec
commit 821eeb41ae
16 changed files with 243 additions and 18 deletions

View File

@ -0,0 +1,29 @@
using Hcs.Broker;
using Hcs.WebApp.Data.Hcs;
using Hcs.WebApp.Services;
namespace Hcs.WebApp.BackgroundServices.ResultGetters.NsiCommon
{
public class ExportNsiItemGetter_15_7_0_1(IClient client, IServiceScope scope, Operation operation) : ResultGetterBase(client, scope, operation)
{
public override async Task<ResultGetterResponse> GetAsync()
{
var result = await client.NsiCommon.GetExportNsiItemResultAsync(operation.MessageGuid!);
if (!result.Ready)
{
return ResultGetterResponse.NotReady;
}
if (result.Success)
{
var registryService = scope.ServiceProvider.GetRequiredService<RegistryService>();
var registry = await registryService.GetRegistryByOperationIdAsync(operation.Id);
// TODO
return ResultGetterResponse.Successful;
}
return ResultGetterResponse.Failed;
}
}
}