public void Notify(StockTick tick) { if (Ticked != null) { Ticked(this, tick); } }
private StockTick CreateStock() { var stock = new StockTick() { QuoteSymbol = _symbols[0], //Price = Decimal.Round((decimal)_random.NextDouble() * _random.Next(5), 2) Price = _counter += 1 }; return(stock); }
private void EmitTick(StockTick stock) { _ticker.Notify(stock); }
private void _ticker_Ticked(object sender, StockTick e) { Console.WriteLine($"Stock: {e.QuoteSymbol}, Price: {e.Price}."); }