public static OddsChangeMarket Parse(dynamic dynamicXml) { var builder = new OddsChangeMarket { Id = dynamicXml.Id <int>(), Favourite = dynamicXml.Favourite <int?>() == 1, Outcomes = OddsChangeOutcome.ParseList(dynamicXml.GetOutcomeList()), Specifiers = dynamicXml.Specifiers, Status = dynamicXml.Status <OddsChangeMarketStatus?>() }; return(builder); }
public static OddsChange Parse(dynamic dynamicXml) { if (dynamicXml == null) { return(null); } var builder = new OddsChange { BetStopReason = dynamicXml.Odds?.BetStopReason <OddsChangeBetStopReason?>(), BettingStatus = dynamicXml.Odds?.BettingStatus <OddsChangeBettingStatus?>(), EventId = dynamicXml.EventId, SportEventStatus = OddsChangeEventStatus.Parse(dynamicXml.SportEventStatus), Markets = OddsChangeMarket.ParseList(dynamicXml.Odds?.GetMarketList()), OddsChangeReason = dynamicXml.OddsChangeReason <OddsChangeReason>(), Product = dynamicXml.Product <ProductType>(), RequestId = dynamicXml.RequestId <int?>(), Timestamp = dynamicXml.Timestamp <long>() }; return(builder); }