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

22 lines
594 B
C#
Raw Normal View History

using System.Text.Json.Serialization;
2023-08-12 19:08:38 +01:00
using Newtonsoft.Json;
namespace LootDumpProcessor.Model;
public class ComposedKey(string key, Item? firstItem)
2023-08-12 19:08:38 +01:00
{
[JsonProperty("key")] [JsonPropertyName("key")] public string Key { get; init; } = key;
2023-08-12 19:08:38 +01:00
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public Item? FirstItem { get; } = firstItem;
2023-08-12 19:08:38 +01:00
public override bool Equals(object? obj)
{
if (obj is not ComposedKey key)
return false;
return Key == key.Key;
2023-08-12 19:08:38 +01:00
}
public override int GetHashCode() => Key.GetHashCode();
}