mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-12-05 15:52:34 +01:00
19 lines
672 B
C#
19 lines
672 B
C#
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;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|