protected override Dictionary <string, double> ResolveCore(FootballPrediction source) { var ret = new Dictionary <string, double>(); foreach (var outcomeKVP in source.OutcomeProbabilities) { ret.Add(outcomeKVP.Key.ToString(), outcomeKVP.Value); } return(ret); }
protected override IEnumerable <ScoreLineProbabilityViewModel> ResolveCore(FootballPrediction source) { if (source.ScoreLineProbabilities.Any(x => !x.Value.HasValue)) { return(Enumerable.Empty <ScoreLineProbabilityViewModel>()); } else { return(source.ScoreLineProbabilities.Select(s => new ScoreLineProbabilityViewModel() { ScoreLine = s.Key, ScoreLineProbability = s.Value })); } }