private static Session GetSessionById(StaticRaceWeekend.Weekend w, int sessionNum)
        {
            Session ret = null;

            if (sessionNum == w.Practice.SessionNum)
            {
                ret = w.Practice;
            }
            else if (sessionNum == w.Qualify.SessionNum)
            {
                ret = w.Qualify;
            }
            else if (sessionNum == w.HappyHour.SessionNum)
            {
                ret = w.HappyHour;
            }
            else if (sessionNum == w.Race.SessionNum)
            {
                ret = w.Race;
            }
            else
            {
                ret = null;
            }

            w.SetCurrentSession(ret);

            return(ret);
        }
        internal static void Update(StaticRaceWeekend.Weekend w, TelemetryEvents.SessionInfo e, out Session changedSession)
        {
            w.CurrentSessionType = GetSessionType(e.SessionType);
            Session s = GetSessionToUpdate(w, e);

            s.SessionNum = e.SessionNum;

            if (s is NonRaceSession)
            {
                UpdateNonRaceSession(s as NonRaceSession, e);
            }
            else
            {
                UpdateRaceSession(s as RaceSession, e);
            }

            w.SetCurrentSession(s);
            changedSession = s;
        }