Ejemplo n.º 1
0
        public void UpdateOdds(RunnerOdds odds)
        {
            hasOdds = true;

            foreach (Runner r in Runners)
            {
                if (odds != null)
                {
                    r.UpdateDOOdds(odds.GetRunner(r.No), this.WinMarketId == null && this.PlaceMarketId == null);
                }
            }
        }
Ejemplo n.º 2
0
 private void doWorker(object sender, DoWorkEventArgs args)
 {
     foreach (Event evt in meetings.SelectMany(m => m.Events).Where(evt => evt.Check &&
                                                                    evt.StartTime.AddMinutes(-DOPreEventCheck) <= DateTime.Now &&
                                                                    evt.StartTime.AddMinutes(DOPostEventCheck) >= DateTime.Now))
     {
         try {
             RunnerOdds odds = dynOdds.GetRunnerOdds(evt);
             foreach (Runner r in evt.Runners)
             {
                 r.UpdateDOOdds(odds.GetRunner(r.No), evt.WinMarketId == null && evt.PlaceMarketId == null);
                 r.CheckMatch(Mappings.WinBackNames, Mappings.WinLayNames, Mappings.PlaceBackNames, Mappings.PlaceLayNames, CapOdds);
             }
         } catch (HttpRequestException ex) {
             logger.Warn("GetRunnerOdds - Suppressed: " + evt, ex);
             if (ex.Message == "Incorrect SessionID Provided")
             {
                 // Hack around weird sessionIds
                 logger.Warn("Attempting Auto Login");
                 dynOdds.doLogin();
             }
         }
     }
 }