mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
Account db read operation
This commit is contained in:
1 parent
91f69a6e39
commit
1c803585e1
7 files changed
+61
-5
No files matched your search
+23
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user