mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-24 11:50:05 +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
+19
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using WotBlitzStatisticsPro.Logic.Pipeline;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Logic.AccountInformationPipeline.Operations
|
||||
{
|
||||
public class CheckLAstBattleDateOperation : IOperation<AccountInformationPipelineContext>
|
||||
{
|
||||
public Task Invoke(AccountInformationPipelineContext context, Func<AccountInformationPipelineContext, Task> next)
|
||||
{
|
||||
if (context.DbAccountInfo == null ||
|
||||
context.DbAccountInfo.LastBattleTime >= context.AccountInfo.LastBattleTime)
|
||||
{
|
||||
return next.Invoke(context);
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user