なろうブックマーク分析用ツールのPrism+WinUI3サンプル実装
Rev. | 91b05482e5b7288185c0f453ccfc74c20099b04b |
---|---|
Größe | 1,394 Bytes |
Zeit | 2023-09-30 19:37:53 |
Autor | yoshy |
Log Message | [MOD] プロジェクト間の依存関係、外部パッケージへの依存関係の修正
|
using CleanAuLait.Domain.Service;
using CleanAuLait.UseCase.Interactor;
using CleanAuLait.UseCase.Response;
using TestNarou3.Domain.Boundary.Service;
using TestNarou3.Domain.Model.Config;
using TestNarou3.UseCase.Boundary.Interactor;
using TestNarou3.UseCase.Boundary.Presenter;
using TestNarou3.UseCase.Request;
using TestNarou3.UseCase.Response;
namespace TestNarou3.UseCase.Interactor
{
internal class AppConfigLoadInteractor
: AbstractUseCaseInteractor<AppConfigLoadRequest, AppConfigLoadResponse>
, IAppConfigLoadInteractor
{
private readonly IAppConfigService service;
private readonly IAppConfigLoadPresenter presenter;
public AppConfigLoadInteractor(
IAppConfigService service,
IAppConfigLoadPresenter presenter
)
{
this.service = service;
this.presenter = presenter;
}
public override AppConfigLoadResponse Interact(AppConfigLoadRequest req)
{
try
{
AppConfig appConfig = this.service.Load();
AppConfigLoadResponse res = new(appConfig);
return presenter.Present(req, res);
}
catch (ServiceException e)
{
return UseCaseResponse.Abort<AppConfigLoadResponse>(e.Message);
}
}
}
}