0
0
mirror of https://github.com/sp-tarkov/loot-dump-processor.git synced 2025-02-13 09:50:44 -05:00
bluextx 047372b6dc Refactored dependency injection and logging infrastructure
The changes include:
- Replaced custom logging with Microsoft.Extensions.Logging
- Added TarkovItemsProvider and ComposedKeyGenerator services
- Simplified configuration models by removing redundant options
- Improved dependency injection in processors and readers
- Removed unused factory methods and simplified service registration
2025-01-11 09:12:45 +03:00

22 lines
594 B
C#

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