public MinecraftLogsParserService(string logFilesDirectoryPath, MinecraftLogsDatabase logsDatabase)
        {
            if (string.IsNullOrEmpty(logFilesDirectoryPath))
            {
                throw new ArgumentNullException("logFilesDirectoryPath");
            }

            if (logsDatabase == null)
            {
                throw new ArgumentNullException("logsDatabase");
            }

            if (!Directory.Exists(logFilesDirectoryPath))
            {
                throw new DirectoryNotFoundException(string.Format("The log files directory was not found at {0}", logFilesDirectoryPath));
            }

            _logFilesDirectoryPath = logFilesDirectoryPath;
            _logsDatabase = logsDatabase;

            #region death regex

            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was squashed by a falling anvil)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was pricked to death)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (walked into a cactus while trying to escape) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was shot by arrow)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was shot by) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (drowned)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (drowned whilst trying to escape) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (blew up)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was blown up by) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (hit the ground too hard)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (fell from a high place)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (fell off a ladder)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (fell off some vines)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (fell out of the water)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (fell into a patch of fire)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (fell into a patch of cacti)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was doomed to fall) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was shot off some vines by) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was shot off a ladder by) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was blown from a high place by) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (went up in flames)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (burned to death)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was burnt to a crisp whilst fighting) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (walked into a fire whilst fighting) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (tried to swim in lava)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (tried to swim in lava while trying to escape) (\w+)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (suffocated in a wall)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (starved to death)", RegexOptions.Compiled));
            _deathRegexList.Add(new Regex(@"\[(\d{2}:\d{2}:\d{2})\] \[Server thread\/INFO]: (\w+) (was killed by magic)", RegexOptions.Compiled));

            #endregion
        }
 public LooserboardController(MinecraftLogsDatabase logsDatabase)
 {
     _logsDatabase = logsDatabase;
 }