// Get country by alpha3 code. public static Country GetCountryByAlpha3(CountryCodeAlpha3 code) { if (code == CountryCodeAlpha3.None) { return(null); } return(CountryList.FirstOrDefault(c => c.Alpha3 == code)); }
public Country(string shortName, string fullName, string activeDirectoryName, CountryCode alpha2, CountryCodeAlpha3 alpha3, int?numeric) { ShortName = shortName; FullName = fullName; ActiveDirectoryName = activeDirectoryName; Alpha2 = alpha2; Alpha3 = alpha3; Numeric = numeric; }
public void ActiveDirectoryAlpha3EnumTest(CountryCodeAlpha3 code) { var query = Countries.GetCountryByAlpha3(code); Assert.IsNotNull(query); }
public static CountryCodeAlpha2 ToAlpha2(this CountryCodeAlpha3 countryCode) { return((CountryCodeAlpha2)countryCode); }