mirror of
https://github.com/sp-tarkov/loot-dump-processor.git
synced 2025-02-13 09:10:45 -05:00
![BlueXTX](/assets/img/avatar_default.png)
* Improved thread safety and async processing in dump processor components * Removed unused _processedDumps field and simplified variable scope in QueuePipeline
17 lines
457 B
C#
17 lines
457 B
C#
using System.Collections.Concurrent;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace LootDumpProcessor.Storage.Collections;
|
|
|
|
public class FlatKeyableDictionary<K, V> : ConcurrentDictionary<K, V>, IKeyable
|
|
{
|
|
[JsonPropertyName("__id__")] private string Id { get; set; }
|
|
|
|
public FlatKeyableDictionary(string id)
|
|
{
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(id);
|
|
Id = id;
|
|
}
|
|
|
|
public IKey GetKey() => new FlatUniqueKey([Id]);
|
|
} |