示例#1
0
            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);
            }
示例#2
0
 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
         }));
     }
 }