mirror of
https://github.com/sp-tarkov/loot-dump-processor.git
synced 2025-02-13 09:50:44 -05:00
The changes include: - Replaced Newtonsoft.Json with System.Text.Json for serialization - Removed redundant JsonProperty attributes and simplified model classes - Converted static fields to constants where appropriate - Improved code formatting and readability - Simplified method bodies and expressions - Removed unused imports and cleaned up namespaces
28 lines
581 B
C#
28 lines
581 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() => processedDumps.ToList();
|
|
|
|
public void Clear()
|
|
{
|
|
processedDumps.Clear();
|
|
}
|
|
} |