Exemplo n.º 1
0
 private void ReleaseUpdater()
 {
     if (_statisticUpdater != null)
     {
         PairStatisticUpdaterProvider.ReleaseUpdater(_statisticUpdater);
         _statisticUpdater.Changed -= PairStatisticUpdater_Changed;
     }
 }
Exemplo n.º 2
0
        private void NeedStatisticsOf(Market market)
        {
            ReleaseUpdater();

            if (market == null)
            {
                Statistics = null;
                OnStatisticChanged();
                return;
            }

            _statisticUpdater          = PairStatisticUpdaterProvider.GetUpdater(market, _refreshInterval);
            _statisticUpdater.Changed += PairStatisticUpdater_Changed;
            if (_statisticUpdater.LastValue != null)
            {
                SetStatistics(_statisticUpdater.LastValue);
            }

            _statisticUpdater.Start();
        }