public void ProcessStockTickerData(StockTickerPayload payload) { received++; TextBlock1.Text = payload.StockId; TextBlock2.Text = payload.StockValue.ToString(); TextBlock3.Text = string.Format("Total Received: {0}", received); }
private void GenerateTickerEvent() { var delta = _random.Next(-1, 2); var stockId = StockIdCombo.Text; _currentValue += delta; var output = string.Format("{0}: {1}", stockId, _currentValue.ToString()); StockValueList.Items.Insert(0, output); var payload = new StockTickerPayload { StockId = stockId, StockValue = _currentValue, }; _eventAggregator.GetEvent <StockTickerEvent>().Publish(payload); }