private Continent MockContinent(ContinentCode continentCode, string name) { Continent domain = new Continent(); ((Core.ParseHandling.Elements.Continent.ContinentCode)domain.Elements.FirstOrDefault(e => e.InternalName == "Code")).Value = new ContinentCodeValue { Value = continentCode }; ((Core.ParseHandling.Elements.Continent.Name)domain.Elements.FirstOrDefault(e => e.InternalName == "Name")).Value = new StringValue { Value = name }; return(domain); }
internal CountryInfo(string countryName, string alpha2Code, string alpha3Code, string numericCode, ContinentCode continentCode = ContinentCode.Unknown, params MobileInfo[] mobileCodes) { NumericCode = numericCode; Alpha2Code = alpha2Code; Alpha3Code = alpha3Code; CountryName = countryName; ContinentCode = continentCode; if (mobileCodes == null) { return; } foreach (var mobileCode in mobileCodes) { _mobileCodes.Add(mobileCode); } }
/*******************************************************************/ /// <summary> /// Get the country information list for the continent code. <br/> /// 대륙코드에 대한 국가정보목록을 가져옵니다. /// </summary> /// <param name="continentCode"></param> /// <returns></returns> /*******************************************************************/ public static IEnumerable <CountryInfo> GetCountryInfoForContinentCode(ContinentCode continentCode) => AllCountries.Where(country => country.ContinentCode == continentCode);