Esempio n. 1
0
        void RefreshStatistics(bool clear)
        {
            //if (clear) statistics = new StatisticsViewModel();

            if (snapshots.ContainsKey(CurrentDatabase))
            {
                var snapshot = snapshots[CurrentDatabase];
                statistics.Accept(snapshot);
            }

            RetrieveStatisticsForCurrentDatabase();
        }
Esempio n. 2
0
        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
            });
        }
Esempio n. 3
0
 private void ProcessStatistics(DatabaseStatistics mostRecent)
 {
     statistics.Accept(mostRecent);
     Errors = mostRecent.Errors.OrderByDescending(error => error.Timestamp);
     events.Publish(new StatisticsUpdated(mostRecent));
 }