private void RaiseGameEvent(string jsonString) { TimeOfLastRadarGameEventOrHeartbeat = DateTime.Now; bool isHeartbeat = jsonString.Contains("heartbeat"); NflGameEvent nflGameEvent = null; if (isHeartbeat) { // Logger.Info("Radar heartbeat"); } if (!isHeartbeat) { Logger.Info(jsonString); nflGameEvent = NflGameEvent.FromJson(jsonString); } bool isGameEvent = nflGameEvent != null; if (isGameEvent) { NflGameEventEventArgs nflGameEventEventArgs = new NflGameEventEventArgs { GameEvent = nflGameEvent }; OnRadarGameEvent(nflGameEventEventArgs); } }
private void OnRadarGameEvent(NflGameEventEventArgs nflGameEventEventArgs) { RadarGameEvent?.Invoke(this, nflGameEventEventArgs); }