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

16 lines
410 B
C#
Raw Normal View History

using System.Text.Json.Serialization;
2023-08-12 19:08:38 +01:00
namespace LootDumpProcessor.Storage.Collections;
public class FlatKeyableDictionary<K, V> : Dictionary<K, V>, IKeyable
{
[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
}