void OnMessage(TickerMessage message) { lock (messagelock) { messages.Add(new TickerHttpMessage { Message = message, Timestamp = DateTime.Now, Decay = 60.0 }); } }
void ITimerService.Process(double time) { lock (sourcelock) { if (sources.Count == 0) { return; } index = (index + 1) % sources.Count; try { TickerMessage message = sources[index].GenerateTickerMessage(); if (message != null) { Message?.Invoke(message); } } catch (Exception e) { Logger.Error(this, "Error displaying ticker message", e); } } }