mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-22 19:00:07 +02:00
23 lines
858 B
C#
23 lines
858 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using WotBlitzStatisticsPro.DataAccess;
|
|
using WotBlitzStatisticsPro.Logic.Pipeline;
|
|
|
|
namespace WotBlitzStatisticsPro.Logic.AccountInformationPipeline.Operations
|
|
{
|
|
public class ReadAccountInfoFromDbOperation : IOperation<AccountInformationPipelineContext>
|
|
{
|
|
private readonly IWargamingAccountDataAccessor _accountDataAccessor;
|
|
|
|
public ReadAccountInfoFromDbOperation(IWargamingAccountDataAccessor accountDataAccessor)
|
|
{
|
|
_accountDataAccessor = accountDataAccessor;
|
|
}
|
|
|
|
public async Task Invoke(AccountInformationPipelineContext context, Func<AccountInformationPipelineContext, Task> next)
|
|
{
|
|
context.DbAccountInfo = await _accountDataAccessor.ReadAccountInfo(context.AccountId);
|
|
await next.Invoke(context);
|
|
}
|
|
}
|
|
} |