using System; namespace LLib.Shop.Model; public sealed class ItemForSale : IEquatable { public required int Position { get; init; } public required uint ItemId { get; init; } public required string? ItemName { get; init; } public required uint Price { get; init; } public required uint CurrencyItemId { get; init; } public required uint OwnedItems { get; init; } public bool Equals(ItemForSale? other) { int num = ((other != null) ? (-673406129) : (-673406143)); while (true) { int num2 = num; int num3 = -673406136; int num4 = num2; int num5 = num4 + num3; int num6 = num4 & num3; switch (num5 - (num6 + num6)) { case 8: num = ((Price != other.Price) ? (-673406130) : (-673406133)); break; case 9: return false; case 2: return OwnedItems == other.OwnedItems; case 0: num = -673406143; break; case 6: return false; case 7: num = ((this != other) ? (-673406135) : (-673406132)); break; case 3: num = ((CurrencyItemId != other.CurrencyItemId) ? (-673406130) : (-673406134)); break; case 4: return true; case 5: num = ((ItemId != other.ItemId) ? (-673406130) : (-673406144)); break; case 1: num = ((Position != other.Position) ? (-673406130) : (-673406131)); break; } } } bool IEquatable.Equals(ItemForSale? other) { //ILSpy generated this explicit interface implementation from .override directive in Equals return this.Equals(other); } public override bool Equals(object? obj) { return Equals(obj as ItemForSale); } public override int GetHashCode() { return HashCode.Combine(Position, ItemId, Price, CurrencyItemId, OwnedItems); } }