コード例 #1
0
ファイル: RunePage.cs プロジェクト: maxirejlis/APitems-LOL
 public static RunePage Mapper(MySqlDataReader reader)
 {
     RunePage r = new RunePage();
     r.ParticipantId = reader.GetInt32("ParticipantId");
     r.MatchId = reader.GetInt32("MatchId");
     r.Runes = new List<Rune>();
     try
     {
         var runesPage = reader.GetString("Runes");
         var runes = runesPage.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
         foreach (var rune in runes)
         {
             r.Runes.Add(RunesCache.Get(int.Parse(rune)));
         }
     }
     catch
     { }
     return r;
 }
コード例 #2
0
        public static RunePage Mapper(MySqlDataReader reader)
        {
            RunePage r = new RunePage();

            r.ParticipantId = reader.GetInt32("ParticipantId");
            r.MatchId       = reader.GetInt32("MatchId");
            r.Runes         = new List <Rune>();
            try
            {
                var runesPage = reader.GetString("Runes");
                var runes     = runesPage.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (var rune in runes)
                {
                    r.Runes.Add(RunesCache.Get(int.Parse(rune)));
                }
            }
            catch
            { }
            return(r);
        }