Ejemplo n.º 1
0
 public PortfolioAggregator(UserContext context)
 {
     _id           = ObjectId.NewObjectId();
     TimerInterval = 15000;
     Context       = context;
     _scanners     = new List <PortfolioProvider>();
     M.Register <QuoteAssetChangedMessage>(this, BaseAssetChanged);
     _debouncer = new Debouncer();
     _timer     = new TimerIrregular(TimeSpan.FromSeconds(30), KeepPricesSubscriptionAlive);
     _keepAlive = new LatestPriceRequestSubscription(_id);
 }
Ejemplo n.º 2
0
        public PortfolioPaneViewModel()
        {
            if (IsInDesignMode)
            {
                return;
            }

            M.Register <PortfolioResultsMessage>(this, UserContext.Current.Token, PortfolioChanged);

            _subscribeKeepAlive = new PortfolioSubscribeMessage(Id, SubscriptionType.Subscribe);
            _timer = new TimerIrregular(TimeSpan.FromSeconds(30), KeepSubscriptionAlive, true);
        }