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#
16 lines
410 B
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace LootDumpProcessor.Storage.Collections;
|
|
|
|
public class FlatKeyableDictionary<K, V> : Dictionary<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]);
|
|
} |