public override bool CompareSet(JToken jtoken, bool isUpdate = true) { bool b = false; if (!isUpdate) { Hdp1 = "0"; } foreach (JProperty item in jtoken) { try { switch (item.Name) { case "bettype": MarketId = IbcTools.ConvertToMarketId(jtoken[item.Name].ToString()); b = true; break; case "oddsid": OddsId = jtoken[item.Name].ToString(); b = true; break; case "matchid": MatchId = jtoken[item.Name].ToString(); b = true; break; case "oddsstatus": OddsStatus = jtoken[item.Name].ToString(); b = true; break; case "odds1a": HomeOdds = jtoken[item.Name].ToString(); b = true; break; case "odds2a": AwayOdds = jtoken[item.Name].ToString(); b = true; break; case "hdp1": Hdp1 = jtoken[item.Name].ToString(); b = true; break; case "hdp2": Hdp2 = jtoken[item.Name].ToString(); b = true; break; case "resourceid": Resourceid = jtoken[item.Name].ToString(); b = true; break; default: break; } } catch { logger.Error("MarketTwo CompareSet Failed" + jtoken.ToString()); continue; } } return(b); }
public override bool CompareSet(JToken jtoken, bool isUpdate = true) { bool b = false; foreach (JProperty item in jtoken) { try { switch (item.Name) { case "bettype": MarketId = IbcTools.ConvertToMarketId(jtoken[item.Name].ToString()); b = true; break; case "oddsid": OddsId = jtoken[item.Name].ToString(); b = true; break; case "matchid": MatchId = jtoken[item.Name].ToString(); b = true; break; case "oddsstatus": OddsStatus = jtoken[item.Name].ToString(); b = true; break; case "com1": HomeOdds = jtoken[item.Name].ToString(); b = true; break; case "com2": AwayOdds = jtoken[item.Name].ToString(); b = true; break; case "comx": DrawOdds = jtoken[item.Name].ToString(); b = true; break; default: break; } } catch { logger.Error("Market1x2 CompareSet Failed" + jtoken.ToString()); continue; } } return(b); }