public void Start() { if (!IsListening) { IsListening = true; LiveDataService.MonitorCurrentScreen(OnScreenUpdated); LiveDataService.MonitorFormulae(UpdateFormulae); LiveDataService.MonitorSaints(UpdateSaints); } }
private static void DoListSaints(string[] args) { if (args.Length == 1 || args[1] == "list") { foreach (var l in StaticDataService.Saints) { Console.WriteLine(l); } } else if (args[1] == "listen") { StartLiveDataService(() => { LiveDataService.MonitorSaints(saints => { Console.WriteLine(); foreach (var s in saints) { Console.WriteLine(s); } }); }); } }