//to need to do subscribe stuff private Task SendRandomTicker(TickerDto tickerInfo) { if (contextHolder.TickerHubClients == null) return Task.FromResult(false); Log.InfoFormat("Broadcast new trade to blotters: {0}", tickerInfo); return contextHolder.TickerHubClients.Group(TickerHub.TickerGroupName).SendTickers(new[] { tickerInfo }); }
public void StoreTicker(TickerDto tickerInfo) { lock (syncLock) { tickers.Enqueue(tickerInfo); if (tickers.Count > MaxTrades) { tickers.Dequeue(); } } }
public Ticker Create(TickerDto ticker) { return new Ticker( ticker.Name, ticker.Price); }