mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-26 03:40:07 +01:00
AccountInfo history statistics query
This commit is contained in:
1 parent
ec8f434f42
commit
758aa10e55
18 files changed
+522
-28
No files matched your search
@@ -62,20 +62,19 @@ namespace WotBlitzStatisticsPro.Logic
|
||||
|
||||
public async Task<AccountInfoHistoryResponse> GetAccountInfoHistory(RealmType realm, long accountId, DateTime startDate, RequestLanguage requestLanguage)
|
||||
{
|
||||
var contextData = new HistoryInformationPipelineContextData();
|
||||
var contextData = new AccountHistoryInformationPipelineContextData(startDate);
|
||||
var context = new OperationContext(new AccountRequest(accountId, realm, requestLanguage));
|
||||
context.AddOrReplace(contextData);
|
||||
var pipeline = new Pipeline<IOperationContext>(_operationFactory);
|
||||
|
||||
// ToDo:
|
||||
// 1. First read account info from DB operation
|
||||
pipeline.AddOperation<ReadAccountInfoFromDbOperation>()
|
||||
|
||||
// 2. Read account history from DB at the startDate !Array SortedByDate! operation
|
||||
// 3. Fill the OverallAccountStatistics
|
||||
// PeriodAccountStatistics
|
||||
// PeriodDifference
|
||||
// StatisticsHistory
|
||||
.AddOperation<ReadAccountInfoHistoryFromDbOperation>()
|
||||
.AddOperation<CheckIfHistoryIsEmptyOperation>()
|
||||
.AddOperation<FillOverallStatisticsOperation>()
|
||||
.AddOperation<FillPeriodStatisticsOperation>()
|
||||
.AddOperation<FillPeriodDifferenceOperation>()
|
||||
.AddOperation<FillStatisticsDifferenceOperation>()
|
||||
.AddOperation<FillAccountInfoHistoryResponse>()
|
||||
;
|
||||
|
||||
await pipeline.Build()
|
||||
|
||||
Reference in new issue
Block a user