mirror of
https://github.com/sp-tarkov/loot-dump-processor.git
synced 2025-02-13 06:10:46 -05:00
![CWX](/assets/img/avatar_default.png)
* Seperate Tasks into their own methods, Add method to add map name to file name * Formatting and added a few comments * Add Clear method to collectors * Change to local var, so data isnt stored longer than needed * add Clear method to Storages * Add changes for Per Map Processing and file i forgot to commit last time * Update config to have mapNames in it, removed unused yaml file * update comment * changed to not throw so Filemode still can be used
31 lines
605 B
C#
31 lines
605 B
C#
using LootDumpProcessor.Model.Processing;
|
|
|
|
namespace LootDumpProcessor.Process.Collector;
|
|
|
|
public class HashSetCollector : ICollector
|
|
{
|
|
private readonly HashSet<PartialData> processedDumps = new(100_000);
|
|
private readonly object lockObject = new();
|
|
|
|
public void Setup()
|
|
{
|
|
}
|
|
|
|
public void Hold(PartialData outputData)
|
|
{
|
|
lock (lockObject)
|
|
{
|
|
processedDumps.Add(outputData);
|
|
}
|
|
}
|
|
|
|
public List<PartialData> Retrieve()
|
|
{
|
|
return processedDumps.ToList();
|
|
}
|
|
|
|
public void Clear()
|
|
{
|
|
processedDumps.Clear();
|
|
}
|
|
} |