Move parsing to new class

This commit is contained in:
Matt Nadareski
2020-12-10 10:58:00 -08:00
parent 34b9005e58
commit 2ee6d13a77
16 changed files with 206 additions and 165 deletions

View File

@@ -1395,6 +1395,9 @@ namespace SabreTools.DatFiles
string basepath = null;
ItemDictionary dirStats = new ItemDictionary();
// Get the DatTool for parsing
DatTool dt = new DatTool();
// Now process each of the input files
foreach (ParentablePath file in files)
{
@@ -1425,7 +1428,7 @@ namespace SabreTools.DatFiles
staticLogger.Verbose($"Beginning stat collection for '{file.CurrentPath}'");
List<string> games = new List<string>();
DatFile datdata = DatFile.CreateAndParse(file.CurrentPath);
DatFile datdata = dt.CreateAndParse(file.CurrentPath);
datdata.Items.BucketBy(Field.Machine_Name, DedupeType.None, norename: true);
// Output single DAT stats (if asked)