Example #1
0
        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);
            }
        }
Example #2
0
 private void OnRadarGameEvent(NflGameEventEventArgs nflGameEventEventArgs)
 {
     RadarGameEvent?.Invoke(this, nflGameEventEventArgs);
 }