示例#1
0
        public void Clean()
        {
            BestOdds = new Dictionary <Outcome, double>();
            //url
            MatchURL = new Uri("http://odds.bestbetting.com" + PartURL.Replace("-after-30-minutes", ""));

            //Best Odds
            var oddsTokens = WebUtils.ParseWebsite <BestBettingScheduleMatchOdds>(BestOddsString, s => ProgressReporterProvider.Current.ReportProgress(s, ReporterImportance.Low, ReporterAudience.Admin))
                             .Cast <BestBettingScheduleMatchOdds>();

            if (oddsTokens.Count() == 3)
            {
                BestOdds.Add(Outcome.HomeWin, oddsTokens.ElementAt(0).Odds);
                BestOdds.Add(Outcome.Draw, oddsTokens.ElementAt(1).Odds);
                BestOdds.Add(Outcome.AwayWin, oddsTokens.ElementAt(2).Odds);
            }
            else
            {
                BestOdds.Add(Outcome.HomeWin, oddsTokens.ElementAt(0).Odds);
                BestOdds.Add(Outcome.AwayWin, oddsTokens.ElementAt(1).Odds);
            }

            //payout
            Payout = Convert.ToDouble(PayoutString);
        }
 public void Clean()
 {
     MatchURL = new Uri("http://odds.bestbetting.com" + PartURL.Replace("-after-30-minutes", ""));
 }