Example #1
0
 public PlayerStatistics GetPlayerStats(string name)
 {
     try
     {
         using (var database = new LiteDatabase(Program.databasePath))
         {
             var matchesCollection = database.GetCollection <Match>("matches");
             matchesCollection.EnsureIndex(x => x.Scoreboard.Select(y => y.NameInUpperCase));
             return(PlayerStatistics.GetPlayerStats(matchesCollection, name));
         }
     }
     catch (Exception exc)
     {
         Program.log.Error(exc, "An error occured for HTTP GET GetPlayerStats");
         throw exc;
     }
 }