void RefreshStatistics(bool clear) { //if (clear) statistics = new StatisticsViewModel(); if (snapshots.ContainsKey(CurrentDatabase)) { var snapshot = snapshots[CurrentDatabase]; statistics.Accept(snapshot); } RetrieveStatisticsForCurrentDatabase(); }
void ProcessStatistics(DatabaseStatistics mostRecent) { bool docsChanged = false; if (snapshots.ContainsKey(CurrentDatabase)) { docsChanged = (snapshots[CurrentDatabase].CountOfDocuments != mostRecent.CountOfDocuments); } snapshots[CurrentDatabase] = mostRecent; statistics.Accept(mostRecent); Errors = mostRecent.Errors.OrderByDescending(error => error.Timestamp); events.Publish(new StatisticsUpdated(mostRecent) { HasDocumentCountChanged = docsChanged }); }
private void ProcessStatistics(DatabaseStatistics mostRecent) { statistics.Accept(mostRecent); Errors = mostRecent.Errors.OrderByDescending(error => error.Timestamp); events.Publish(new StatisticsUpdated(mostRecent)); }