chomp
6e4c7abf73
Co-authored-by: Alex <alex@dm-me-for-questions.com> Reviewed-on: SPT-AKI/LootDumpProcessor#6
26 lines
536 B
C#
26 lines
536 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();
|
|
}
|
|
} |