public void Notify(StockTick tick)
 {
     if (Ticked != null)
     {
         Ticked(this, tick);
     }
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 private void EmitTick(StockTick stock)
 {
     _ticker.Notify(stock);
 }
Beispiel #4
0
 private void _ticker_Ticked(object sender, StockTick e)
 {
     Console.WriteLine($"Stock: {e.QuoteSymbol}, Price: {e.Price}.");
 }