Esempio n. 1
0
        private void RaiseGameEvent(string jsonString)
        {
            TimeOfLastRadarGameEventOrHeartbeat = DateTime.Now;
            bool            isHeartbeat     = jsonString.Contains("heartbeat");
            NcaafbGameEvent ncaafbGameEvent = null;

            //if (isHeartbeat)
            //{
            //    Logger.Info("Radar heartbeat");
            //}

            if (!isHeartbeat)
            {
                Logger.Info(jsonString);
                ncaafbGameEvent = NcaafbGameEvent.FromJson(jsonString);
            }

            bool isGameEvent = ncaafbGameEvent != null;

            if (isGameEvent)
            {
                NcaafbGameEventEventArgs ncaafbGameEventEventArgs = new NcaafbGameEventEventArgs
                {
                    GameEvent = ncaafbGameEvent
                };
                OnRadarGameEvent(ncaafbGameEventEventArgs);
            }
        }
Esempio n. 2
0
 private void OnRadarGameEvent(NcaafbGameEventEventArgs ncaafbGameEventEventArgs)
 {
     RadarGameEvent?.Invoke(this, ncaafbGameEventEventArgs);
 }