Esempio n. 1
0
        static async Task StartupAsync(IDbConnection connection, string logPath)
        {
            var logFileGroups = LogGroup.FromDirectory(logPath).AsList();

            foreach (var group in logFileGroups)
            {
                var parser   = new LogGroupParser(group);
                var inserter = new LogGroupInserter(parser);
                await inserter.InsertEventsAsync(connection);
            }

            var dumpFile = "dump.db";

            if (File.Exists(dumpFile))
            {
                File.Delete(dumpFile);
            }
            await DatabaseSchema.DumpDatabaseAsync(connection, dumpFile);
        }