0
0
mirror of https://github.com/sp-tarkov/loot-dump-processor.git synced 2025-02-13 08:50:44 -05:00

17 lines
457 B
C#
Raw Permalink Normal View History

using System.Collections.Concurrent;
using System.Text.Json.Serialization;
2023-08-12 19:08:38 +01:00
namespace LootDumpProcessor.Storage.Collections;
public class FlatKeyableDictionary<K, V> : ConcurrentDictionary<K, V>, IKeyable
2023-08-12 19:08:38 +01:00
{
[JsonPropertyName("__id__")] private string Id { get; set; }
2023-08-12 19:08:38 +01:00
public FlatKeyableDictionary(string id)
{
ArgumentException.ThrowIfNullOrWhiteSpace(id);
Id = id;
}
public IKey GetKey() => new FlatUniqueKey([Id]);
2023-08-12 19:08:38 +01:00
}