Example #1
0
     private void AddToNameTracker(PK3Entry entry)
     {
         if (nameToEntry.TryGetValue(entry.Name, out List <PK3Entry> existingEntries))
         {
             existingEntries.Add(entry);
         }
         else
         {
             nameToEntry[entry.Name] = new List <PK3Entry> {
                 entry
             }
         };
     }
 }
Example #2
0
        private void AddToTopLevelFolderTracker(PK3Entry entry)
        {
            if (entry.Path.Folders.Count >= 1)
            {
                UpperString topLevelFolder = entry.Path.Folders[0];

                if (topLevelFolderEntries.TryGetValue(topLevelFolder, out List <PK3Entry> existingFolderList))
                {
                    existingFolderList.Add(entry);
                }
                else
                {
                    topLevelFolderEntries[topLevelFolder] = new List <PK3Entry> {
                        entry
                    }
                };
            }
        }