mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
UserCountry
-> Country
This commit is contained in:
@ -34,20 +34,20 @@ namespace osu.Game.Online.API.Requests.Responses
|
|||||||
[JsonProperty(@"previous_usernames")]
|
[JsonProperty(@"previous_usernames")]
|
||||||
public string[] PreviousUsernames;
|
public string[] PreviousUsernames;
|
||||||
|
|
||||||
private Country? country;
|
private CountryCode? countryCode;
|
||||||
|
|
||||||
public Country Country
|
public CountryCode CountryCode
|
||||||
{
|
{
|
||||||
get => country ??= (Enum.TryParse(userCountry?.Code, out Country result) ? result : default);
|
get => countryCode ??= (Enum.TryParse(country?.Code, out CountryCode result) ? result : default);
|
||||||
set => country = value;
|
set => countryCode = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable 649
|
#pragma warning disable 649
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
[JsonProperty(@"country")]
|
[JsonProperty(@"country")]
|
||||||
private UserCountry userCountry;
|
private Country country;
|
||||||
|
|
||||||
private class UserCountry
|
private class Country
|
||||||
{
|
{
|
||||||
[JsonProperty(@"code")]
|
[JsonProperty(@"code")]
|
||||||
public string Code;
|
public string Code;
|
||||||
|
Reference in New Issue
Block a user