mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
CodeFileSanity does not like records in standalone files
This commit is contained in:
parent
a3f720bc62
commit
ac449131ed
@ -1,16 +1,29 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace osu.Game.Online.API.Requests.Responses
|
namespace osu.Game.Online.API.Requests.Responses
|
||||||
{
|
{
|
||||||
public record APISystemTitle
|
public class APISystemTitle : IEquatable<APISystemTitle>
|
||||||
{
|
{
|
||||||
[JsonProperty(@"image")]
|
[JsonProperty(@"image")]
|
||||||
public string Image { get; set; } = string.Empty;
|
public string Image { get; set; } = string.Empty;
|
||||||
|
|
||||||
[JsonProperty(@"url")]
|
[JsonProperty(@"url")]
|
||||||
public string Url { get; set; } = string.Empty;
|
public string Url { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool Equals(APISystemTitle? other)
|
||||||
|
{
|
||||||
|
if (ReferenceEquals(null, other)) return false;
|
||||||
|
if (ReferenceEquals(this, other)) return true;
|
||||||
|
|
||||||
|
return Image == other.Image && Url == other.Url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object? obj) => obj is APISystemTitle other && Equals(other);
|
||||||
|
|
||||||
|
public override int GetHashCode() => HashCode.Combine(Image, Url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user