コード例 #1
0
 public void AddResult(PokemonRankResult model)
 {
     Add(model);
     foreach (var item in model.BattleRecords)
     {
         Add(item);
     }
 }
コード例 #2
0
 public static ArenaResultsShortInfoViewModel ToViewModel(this PokemonRankResult model)
 => new ArenaResultsShortInfoViewModel()
 {
     Id   = model.Id,
     Date = model.Date.ToLocalTime(),
     ElapsedMiliseconds = model.ElapsedMiliseconds,
     StepCount          = model.StepCount,
     WinnerId           = model.BattleRecords.Count == 0
             ? -1
             : model.BattleRecords.Last().ChallengerPokemonId
 };