public static RuntimeCountryInfo Of(string alphaCode) => Of(CountryManager.GetCountryInfo(alphaCode));
 /// <summary>
 /// To country info
 /// </summary>
 /// <returns></returns>
 public CountryInfo ToCountryInfo()
 {
     return(CountryManager.GetCountryInfo(Alpha2Code));
 }
 public static RuntimeCountryInfo Of(RegionCodeValue code) => CountryManager.GetCountryInfo(code);
 public static RuntimeCountryInfo Of(long cep1CrCode) => CountryManager.GetCountryInfo(cep1CrCode);
 public static RuntimeCountryInfo Of(Country country) => Of(CountryManager.GetCountryInfo(country));
 public static RuntimeCountryInfo Of(CountryCode code) => Of(CountryManager.GetCountryInfo(code));
 /// <summary>
 /// Convert <see cref="CountryCode"/> to <see cref="Country"/>.
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public static Country ToCountry(this CountryCode code)
 {
     return(CountryManager.GetCountryEnum(code));
 }
 /// <summary>
 /// Convert <see cref="Country"/> to <see cref="CountryCode"/>.
 /// </summary>
 /// <param name="country"></param>
 /// <returns></returns>
 public static CountryCode ToCode(this Country country)
 {
     return(CountryManager.GetCountryCode(country));
 }
 /// <summary>
 /// Convert <see cref="CountryCode"/> to <see cref="CountryInfo"/>.
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public static CountryInfo ToInfo(this CountryCode code)
 {
     return(CountryManager.GetCountryInfo(code));
 }
 /// <summary>
 /// Get Alpha3 code from <see cref="Country"/>.
 /// </summary>
 /// <param name="country"></param>
 /// <returns></returns>
 public static string GetAlpha3Code(this Country country)
 {
     return(CountryManager.GetCountryInfo(country).Alpha3Code);
 }
 /// <summary>
 /// Convert <see cref="Country"/> to <see cref="CountryInfo"/>.
 /// </summary>
 /// <param name="country"></param>
 /// <returns></returns>
 public static CountryInfo ToInfo(this Country country)
 {
     return(CountryManager.GetCountryInfo(country));
 }
 /// <summary>
 /// Get Alpha2 code from <see cref="CountryCode"/>.
 /// </summary>
 /// <param name="code"></param>
 /// <returns></returns>
 public static string GetAlpha2Code(this CountryCode code)
 {
     return(CountryManager.GetCountryInfo(code).Alpha2Code);
 }
Ejemplo n.º 13
0
 public CountryEnumValue(Country country)
 {
     _countryEnum       = country;
     _countryEnumString = country.GetName();
     _countryInfo       = CountryManager.GetCountryInfo(country);
 }