public void Clean() { if (OddsText == "Evs") { DecimalOdds = 2.0; } else { if (OddsText.IndexOf('-') >= 0) { DecimalOdds = 1.01; } else { var numDen = OddsText.Split('/'); DecimalOdds = numDen.Length == 1 ? Math.Round(1 + Convert.ToDouble(numDen[0])) : Math.Round(1 + Convert.ToDouble(numDen[0]) / Convert.ToDouble(numDen[1]), 2); } } if (OddsMetaData.Length >= 3) { if (OddsMetaData.Substring(OddsMetaData.Length - 2) == " b") { IsBestOdd = true; } } }
public void Clean() { BetSlipValue = string.Format("betslip/{0}/{1}/{2}/{3}/{4}", BookmakerCode, MarketIDOne, MarketIDTwo, URLPart, URLStub); if (OddsText == "Evs") { DecimalOdds = 2.0; } else { var numDen = OddsText.Split('/'); DecimalOdds = numDen.Length == 1 ? Math.Round(1 + Convert.ToDouble(numDen[0])) : Math.Round(1 + Convert.ToDouble(numDen[0]) / Convert.ToDouble(numDen[1]), 2); } }