make extensions projectable

This commit is contained in:
honzapatCZ 2026-10-26 14:20:20 +01:00
parent 45b2f56aaf
commit bebc2d9df7

View File

@ -1017,6 +1017,7 @@ namespace NejCommon.Models
public static CultureInfo GetCultureInfo(this Country country) => new CultureInfo(country.GetCountryCode()); public static CultureInfo GetCultureInfo(this Country country) => new CultureInfo(country.GetCountryCode());
public static string GetDisplayName(this Country country) => CountryProvider.GetCountry(country.GetCountryCode()).NativeName; public static string GetDisplayName(this Country country) => CountryProvider.GetCountry(country.GetCountryCode()).NativeName;
[Projectable]
public static bool IsEU(this Country country) => country switch public static bool IsEU(this Country country) => country switch
{ {
Country.AT => true, Country.AT => true,
@ -1049,6 +1050,7 @@ namespace NejCommon.Models
_ => false _ => false
}; };
[Projectable]
public static bool IsEEA(this Country country) => IsEU(country) || (country switch public static bool IsEEA(this Country country) => IsEU(country) || (country switch
{ {
//extras //extras
@ -1058,6 +1060,7 @@ namespace NejCommon.Models
_ => false _ => false
}); });
[Projectable]
public static bool IsSEPA(this Country country) => IsEEA(country) || (country switch{ public static bool IsSEPA(this Country country) => IsEEA(country) || (country switch{
Country.CH => true, Country.CH => true,
Country.GB => true, Country.GB => true,