Skip to content

Commit c06d513

Browse files
committed
Make CountryInfo a class due to its size
1 parent 315a7fc commit c06d513

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

Common/Geo/CountryInfo.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,23 @@
22

33
namespace OpenShock.Common.Geo;
44

5-
public readonly record struct CountryInfo(Alpha2CountryCode CountryCode, string Name, float Latitude, float Longitude, string? CfRegion)
5+
public sealed class CountryInfo
66
{
7+
public CountryInfo(Alpha2CountryCode countryCode, string name, float latitude, float longitude, string? cfRegion)
8+
{
9+
CountryCode = countryCode;
10+
Name = name;
11+
Latitude = latitude;
12+
Longitude = longitude;
13+
CfRegion = cfRegion;
14+
}
15+
16+
public Alpha2CountryCode CountryCode { get; init; }
17+
public string Name { get; init; }
18+
public float Latitude { get; init; }
19+
public float Longitude { get; init; }
20+
public string? CfRegion { get; init; }
21+
722
public static readonly CountryInfo UnknownCountry = new(Alpha2CountryCode.UnknownCountry, "Unknown", 0f, 0f, null);
823
public static readonly CountryInfo[] Countries =
924
[

0 commit comments

Comments
 (0)