| | | 1 | | // ----------------------------------------------------------------------- |
| | | 2 | | // <copyright file="Country.cs" company="Stéphane ANDRE"> |
| | | 3 | | // Copyright (c) Stéphane ANDRE. All rights reserved. |
| | | 4 | | // </copyright> |
| | | 5 | | // ----------------------------------------------------------------------- |
| | | 6 | | |
| | | 7 | | using System.Diagnostics.CodeAnalysis; |
| | | 8 | | using MyNet.Primitives; |
| | | 9 | | |
| | | 10 | | namespace MyNet.Geography; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Represents a country using standardized ISO 3166 codes and associated continent information. |
| | | 14 | | /// </summary> |
| | | 15 | | /// <remarks>The Country class provides a strongly-typed representation of countries, including their ISO 3166 |
| | | 16 | | /// numeric, alpha-2, and alpha-3 codes, as well as the continent to which each country belongs. This enables consistent |
| | | 17 | | /// handling of country data across applications, particularly when interoperating with external systems or data formats |
| | | 18 | | /// that require standardized country identifiers.</remarks> |
| | | 19 | | public sealed class Country : SmartEnum<Country, string> |
| | | 20 | | { |
| | 10 | 21 | | public static readonly Country Afghanistan = new(4, nameof(Afghanistan), "af", "afg", Continent.Asia); |
| | 10 | 22 | | public static readonly Country Albania = new(8, nameof(Albania), "al", "alb", Continent.Europe); |
| | 10 | 23 | | public static readonly Country Antarctica = new(10, nameof(Antarctica), "aq", "ata", Continent.Antarctica); |
| | 10 | 24 | | public static readonly Country Algeria = new(12, nameof(Algeria), "dz", "dza", Continent.Africa); |
| | 10 | 25 | | public static readonly Country AmericanSamoa = new(16, nameof(AmericanSamoa), "as", "asm", Continent.Oceania); |
| | 10 | 26 | | public static readonly Country Andorra = new(20, nameof(Andorra), "ad", "and", Continent.Europe); |
| | 10 | 27 | | public static readonly Country Angola = new(24, nameof(Angola), "ao", "ago", Continent.Africa); |
| | 10 | 28 | | public static readonly Country AntiguaAndBarbuda = new(28, nameof(AntiguaAndBarbuda), "ag", "atg", Continent.NorthAm |
| | 10 | 29 | | public static readonly Country Azerbaijan = new(31, nameof(Azerbaijan), "az", "aze", Continent.Asia); |
| | 10 | 30 | | public static readonly Country Argentina = new(32, nameof(Argentina), "ar", "arg", Continent.SouthAmerica); |
| | 10 | 31 | | public static readonly Country Australia = new(36, nameof(Australia), "au", "aus", Continent.Oceania); |
| | 10 | 32 | | public static readonly Country Austria = new(40, nameof(Austria), "at", "aut", Continent.Europe); |
| | 10 | 33 | | public static readonly Country Bahamas = new(44, nameof(Bahamas), "bs", "bhs", Continent.NorthAmerica); |
| | 10 | 34 | | public static readonly Country Bahrain = new(48, nameof(Bahrain), "bh", "bhr", Continent.Asia); |
| | 10 | 35 | | public static readonly Country Bangladesh = new(50, nameof(Bangladesh), "bd", "bgd", Continent.Asia); |
| | 10 | 36 | | public static readonly Country Armenia = new(51, nameof(Armenia), "am", "arm", Continent.Europe); |
| | 10 | 37 | | public static readonly Country Barbados = new(52, nameof(Barbados), "bb", "brb", Continent.NorthAmerica); |
| | 10 | 38 | | public static readonly Country Belgium = new(56, nameof(Belgium), "be", "bel", Continent.Europe); |
| | 10 | 39 | | public static readonly Country Bermuda = new(60, nameof(Bermuda), "bm", "bmu", Continent.NorthAmerica); |
| | 10 | 40 | | public static readonly Country Bhutan = new(64, nameof(Bhutan), "bt", "btn", Continent.Asia); |
| | 10 | 41 | | public static readonly Country Bolivia = new(68, nameof(Bolivia), "bo", "bol", Continent.SouthAmerica); |
| | 10 | 42 | | public static readonly Country BosniaAndHerzegovina = new(70, nameof(BosniaAndHerzegovina), "ba", "bih", Continent.E |
| | 10 | 43 | | public static readonly Country Botswana = new(72, nameof(Botswana), "bw", "bwa", Continent.Africa); |
| | 10 | 44 | | public static readonly Country BouvetIsland = new(74, nameof(BouvetIsland), "bv", "bvt", Continent.Antarctica); |
| | 10 | 45 | | public static readonly Country Brazil = new(76, nameof(Brazil), "br", "bra", Continent.SouthAmerica); |
| | 10 | 46 | | public static readonly Country Belize = new(84, nameof(Belize), "bz", "blz", Continent.NorthAmerica); |
| | 10 | 47 | | public static readonly Country BritishIndianOceanTerritory = new(86, nameof(BritishIndianOceanTerritory), "io", "iot |
| | 10 | 48 | | public static readonly Country SolomonIslands = new(90, nameof(SolomonIslands), "sb", "slb", Continent.Oceania); |
| | | 49 | | [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Country name contains 'UK' as per ISO 3166 stan |
| | 10 | 50 | | public static readonly Country VirginIslandsUK = new(92, nameof(VirginIslandsUK), "vg", "vgb", Continent.NorthAmeric |
| | 10 | 51 | | public static readonly Country BruneiDarussalam = new(96, nameof(BruneiDarussalam), "bn", "brn", Continent.Asia); |
| | 10 | 52 | | public static readonly Country Bulgaria = new(100, nameof(Bulgaria), "bg", "bgr", Continent.Europe); |
| | 10 | 53 | | public static readonly Country Myanmar = new(104, nameof(Myanmar), "mm", "mmr", Continent.Asia); |
| | 10 | 54 | | public static readonly Country Burundi = new(108, nameof(Burundi), "bi", "bdi", Continent.Africa); |
| | 10 | 55 | | public static readonly Country Belarus = new(112, nameof(Belarus), "by", "blr", Continent.Europe); |
| | 10 | 56 | | public static readonly Country Cambodia = new(116, nameof(Cambodia), "kh", "khm", Continent.Asia); |
| | 10 | 57 | | public static readonly Country Cameroon = new(120, nameof(Cameroon), "cm", "cmr", Continent.Africa); |
| | 10 | 58 | | public static readonly Country Canada = new(124, nameof(Canada), "ca", "can", Continent.NorthAmerica); |
| | 10 | 59 | | public static readonly Country CaboVerde = new(132, nameof(CaboVerde), "cv", "cpv", Continent.Africa); |
| | 10 | 60 | | public static readonly Country CaymanIslands = new(136, nameof(CaymanIslands), "ky", "cym", Continent.NorthAmerica); |
| | 10 | 61 | | public static readonly Country CentralAfricanRepublic = new(140, nameof(CentralAfricanRepublic), "cf", "caf", Contin |
| | 10 | 62 | | public static readonly Country SriLanka = new(144, nameof(SriLanka), "lk", "lka", Continent.Asia); |
| | 10 | 63 | | public static readonly Country Chad = new(148, nameof(Chad), "td", "tcd", Continent.Africa); |
| | 10 | 64 | | public static readonly Country Chile = new(152, nameof(Chile), "cl", "chl", Continent.SouthAmerica); |
| | 10 | 65 | | public static readonly Country China = new(156, nameof(China), "cn", "chn", Continent.Asia); |
| | 10 | 66 | | public static readonly Country Taiwan = new(158, nameof(Taiwan), "tw", "twn", Continent.Asia); |
| | 10 | 67 | | public static readonly Country ChristmasIsland = new(162, nameof(ChristmasIsland), "cx", "cxr", Continent.Asia); |
| | 10 | 68 | | public static readonly Country CocosIslands = new(166, nameof(CocosIslands), "cc", "cck", Continent.Asia); |
| | 10 | 69 | | public static readonly Country Colombia = new(170, nameof(Colombia), "co", "col", Continent.SouthAmerica); |
| | 10 | 70 | | public static readonly Country Comoros = new(174, nameof(Comoros), "km", "com", Continent.Africa); |
| | 10 | 71 | | public static readonly Country Mayotte = new(175, nameof(Mayotte), "yt", "myt", Continent.Africa); |
| | 10 | 72 | | public static readonly Country Congo = new(178, nameof(Congo), "cg", "cog", Continent.Africa); |
| | 10 | 73 | | public static readonly Country CongoDemocraticRepublic = new(180, nameof(CongoDemocraticRepublic), "cd", "cod", Cont |
| | 10 | 74 | | public static readonly Country CookIslands = new(184, nameof(CookIslands), "ck", "cok", Continent.Oceania); |
| | 10 | 75 | | public static readonly Country CostaRica = new(188, nameof(CostaRica), "cr", "cri", Continent.NorthAmerica); |
| | 10 | 76 | | public static readonly Country Croatia = new(191, nameof(Croatia), "hr", "hrv", Continent.Europe); |
| | 10 | 77 | | public static readonly Country Cuba = new(192, nameof(Cuba), "cu", "cub", Continent.NorthAmerica); |
| | 10 | 78 | | public static readonly Country Cyprus = new(196, nameof(Cyprus), "cy", "cyp", Continent.Europe); |
| | 10 | 79 | | public static readonly Country Czechia = new(203, nameof(Czechia), "cz", "cze", Continent.Europe); |
| | 10 | 80 | | public static readonly Country Benin = new(204, nameof(Benin), "bj", "ben", Continent.Africa); |
| | 10 | 81 | | public static readonly Country Denmark = new(208, nameof(Denmark), "dk", "dnk", Continent.Europe); |
| | 10 | 82 | | public static readonly Country Dominica = new(212, nameof(Dominica), "dm", "dma", Continent.Africa); |
| | 10 | 83 | | public static readonly Country DominicanRepublic = new(214, nameof(DominicanRepublic), "do", "dom", Continent.Africa |
| | 10 | 84 | | public static readonly Country Ecuador = new(218, nameof(Ecuador), "ec", "ecu", Continent.SouthAmerica); |
| | 10 | 85 | | public static readonly Country ElSalvador = new(222, nameof(ElSalvador), "sv", "slv", Continent.NorthAmerica); |
| | 10 | 86 | | public static readonly Country EquatorialGuinea = new(226, nameof(EquatorialGuinea), "gq", "gnq", Continent.Africa); |
| | 10 | 87 | | public static readonly Country Ethiopia = new(231, nameof(Ethiopia), "et", "eth", Continent.Africa); |
| | 10 | 88 | | public static readonly Country Eritrea = new(232, nameof(Eritrea), "er", "eri", Continent.Africa); |
| | 10 | 89 | | public static readonly Country Estonia = new(233, nameof(Estonia), "ee", "est", Continent.Europe); |
| | 10 | 90 | | public static readonly Country FaroeIslands = new(234, nameof(FaroeIslands), "fo", "fro", Continent.Europe); |
| | 10 | 91 | | public static readonly Country FalklandIslands = new(238, nameof(FalklandIslands), "fk", "flk", Continent.SouthAmeri |
| | 10 | 92 | | public static readonly Country SouthGeorgiaAndTheSouthSandwichIslands = new(239, nameof(SouthGeorgiaAndTheSouthSandw |
| | 10 | 93 | | public static readonly Country Fiji = new(242, nameof(Fiji), "fj", "fji", Continent.Asia); |
| | 10 | 94 | | public static readonly Country Finland = new(246, nameof(Finland), "fi", "fin", Continent.Europe); |
| | 10 | 95 | | public static readonly Country AlandIslands = new(248, nameof(AlandIslands), "ax", "ala", Continent.Europe); |
| | 10 | 96 | | public static readonly Country France = new(250, nameof(France), "fr", "fra", Continent.Europe); |
| | 10 | 97 | | public static readonly Country FrenchGuiana = new(254, nameof(FrenchGuiana), "gf", "guf", Continent.SouthAmerica); |
| | 10 | 98 | | public static readonly Country FrenchPolynesia = new(258, nameof(FrenchPolynesia), "pf", "pyf", Continent.Oceania); |
| | 10 | 99 | | public static readonly Country FrenchSouthernTerritories = new(260, nameof(FrenchSouthernTerritories), "tf", "atf", |
| | 10 | 100 | | public static readonly Country Djibouti = new(262, nameof(Djibouti), "dj", "dji", Continent.Africa); |
| | 10 | 101 | | public static readonly Country Gabon = new(266, nameof(Gabon), "ga", "gab", Continent.Africa); |
| | 10 | 102 | | public static readonly Country Georgia = new(268, nameof(Georgia), "ge", "geo", Continent.Europe); |
| | 10 | 103 | | public static readonly Country Gambia = new(270, nameof(Gambia), "gm", "gmb", Continent.Africa); |
| | 10 | 104 | | public static readonly Country Palestine = new(275, nameof(Palestine), "ps", "pse", Continent.Asia); |
| | 10 | 105 | | public static readonly Country Germany = new(276, nameof(Germany), "de", "deu", Continent.Europe); |
| | 10 | 106 | | public static readonly Country Ghana = new(288, nameof(Ghana), "gh", "gha", Continent.Africa); |
| | 10 | 107 | | public static readonly Country Gibraltar = new(292, nameof(Gibraltar), "gi", "gib", Continent.Europe); |
| | 10 | 108 | | public static readonly Country Kiribati = new(296, nameof(Kiribati), "ki", "kir", Continent.Oceania); |
| | 10 | 109 | | public static readonly Country Greece = new(300, nameof(Greece), "gr", "grc", Continent.Europe); |
| | 10 | 110 | | public static readonly Country Greenland = new(304, nameof(Greenland), "gl", "grl", Continent.NorthAmerica); |
| | 10 | 111 | | public static readonly Country Grenada = new(308, nameof(Grenada), "gd", "grd", Continent.NorthAmerica); |
| | 10 | 112 | | public static readonly Country Guadeloupe = new(312, nameof(Guadeloupe), "gp", "glp", Continent.NorthAmerica); |
| | 10 | 113 | | public static readonly Country Guam = new(316, nameof(Guam), "gu", "gum", Continent.Oceania); |
| | 10 | 114 | | public static readonly Country Guatemala = new(320, nameof(Guatemala), "gt", "gtm", Continent.NorthAmerica); |
| | 10 | 115 | | public static readonly Country Guinea = new(324, nameof(Guinea), "gn", "gin", Continent.Africa); |
| | 10 | 116 | | public static readonly Country Guyana = new(328, nameof(Guyana), "gy", "guy", Continent.SouthAmerica); |
| | 10 | 117 | | public static readonly Country Haiti = new(332, nameof(Haiti), "ht", "hti", Continent.NorthAmerica); |
| | 10 | 118 | | public static readonly Country HeardIslandAndMcdonaldIslands = new(334, nameof(HeardIslandAndMcdonaldIslands), "hm", |
| | 10 | 119 | | public static readonly Country HolySee = new(336, nameof(HolySee), "va", "vat", Continent.Europe); |
| | 10 | 120 | | public static readonly Country Honduras = new(340, nameof(Honduras), "hn", "hnd", Continent.NorthAmerica); |
| | 10 | 121 | | public static readonly Country HongKong = new(344, nameof(HongKong), "hk", "hkg", Continent.Asia); |
| | 10 | 122 | | public static readonly Country Hungary = new(348, nameof(Hungary), "hu", "hun", Continent.Europe); |
| | 10 | 123 | | public static readonly Country Iceland = new(352, nameof(Iceland), "is", "isl", Continent.Europe); |
| | 10 | 124 | | public static readonly Country India = new(356, nameof(India), "in", "ind", Continent.Asia); |
| | 10 | 125 | | public static readonly Country Indonesia = new(360, nameof(Indonesia), "id", "idn", Continent.Asia); |
| | 10 | 126 | | public static readonly Country Iran = new(364, nameof(Iran), "ir", "irn", Continent.Asia); |
| | 10 | 127 | | public static readonly Country Iraq = new(368, nameof(Iraq), "iq", "irq", Continent.Asia); |
| | 10 | 128 | | public static readonly Country Ireland = new(372, nameof(Ireland), "ie", "irl", Continent.Europe); |
| | 10 | 129 | | public static readonly Country Israel = new(376, nameof(Israel), "il", "isr", Continent.Europe); |
| | 10 | 130 | | public static readonly Country Italy = new(380, nameof(Italy), "it", "ita", Continent.Europe); |
| | 10 | 131 | | public static readonly Country CoteIvoire = new(384, nameof(CoteIvoire), "ci", "civ", Continent.Africa); |
| | 10 | 132 | | public static readonly Country Jamaica = new(388, nameof(Jamaica), "jm", "jam", Continent.NorthAmerica); |
| | 10 | 133 | | public static readonly Country Japan = new(392, nameof(Japan), "jp", "jpn", Continent.Asia); |
| | 10 | 134 | | public static readonly Country Kazakhstan = new(398, nameof(Kazakhstan), "kz", "kaz", Continent.Asia); |
| | 10 | 135 | | public static readonly Country Jordan = new(400, nameof(Jordan), "jo", "jor", Continent.Asia); |
| | 10 | 136 | | public static readonly Country Kenya = new(404, nameof(Kenya), "ke", "ken", Continent.Africa); |
| | 10 | 137 | | public static readonly Country NorthKorea = new(408, nameof(NorthKorea), "kp", "prk", Continent.Asia); |
| | 10 | 138 | | public static readonly Country SouthKorea = new(410, nameof(SouthKorea), "kr", "kor", Continent.Asia); |
| | 10 | 139 | | public static readonly Country Kuwait = new(414, nameof(Kuwait), "kw", "kwt", Continent.Asia); |
| | 10 | 140 | | public static readonly Country Kyrgyzstan = new(417, nameof(Kyrgyzstan), "kg", "kgz", Continent.Asia); |
| | 10 | 141 | | public static readonly Country Lao = new(418, nameof(Lao), "la", "lao", Continent.Asia); |
| | 10 | 142 | | public static readonly Country Lebanon = new(422, nameof(Lebanon), "lb", "lbn", Continent.Asia); |
| | 10 | 143 | | public static readonly Country Lesotho = new(426, nameof(Lesotho), "ls", "lso", Continent.Africa); |
| | 10 | 144 | | public static readonly Country Latvia = new(428, nameof(Latvia), "lv", "lva", Continent.Europe); |
| | 10 | 145 | | public static readonly Country Liberia = new(430, nameof(Liberia), "lr", "lbr", Continent.Africa); |
| | 10 | 146 | | public static readonly Country Libya = new(434, nameof(Libya), "ly", "lby", Continent.Africa); |
| | 10 | 147 | | public static readonly Country Liechtenstein = new(438, nameof(Liechtenstein), "li", "lie", Continent.Europe); |
| | 10 | 148 | | public static readonly Country Lithuania = new(440, nameof(Lithuania), "lt", "ltu", Continent.Europe); |
| | 10 | 149 | | public static readonly Country Luxembourg = new(442, nameof(Luxembourg), "lu", "lux", Continent.Europe); |
| | 10 | 150 | | public static readonly Country Macao = new(446, nameof(Macao), "mo", "mac", Continent.Asia); |
| | 10 | 151 | | public static readonly Country Madagascar = new(450, nameof(Madagascar), "mg", "mdg", Continent.Africa); |
| | 10 | 152 | | public static readonly Country Malawi = new(454, nameof(Malawi), "mw", "mwi", Continent.Africa); |
| | 10 | 153 | | public static readonly Country Malaysia = new(458, nameof(Malaysia), "my", "mys", Continent.Asia); |
| | 10 | 154 | | public static readonly Country Maldives = new(462, nameof(Maldives), "mv", "mdv", Continent.Asia); |
| | 10 | 155 | | public static readonly Country Mali = new(466, nameof(Mali), "ml", "mli", Continent.Africa); |
| | 10 | 156 | | public static readonly Country Malta = new(470, nameof(Malta), "mt", "mlt", Continent.Europe); |
| | 10 | 157 | | public static readonly Country Martinique = new(474, nameof(Martinique), "mq", "mtq", Continent.NorthAmerica); |
| | 10 | 158 | | public static readonly Country Mauritania = new(478, nameof(Mauritania), "mr", "mrt", Continent.Africa); |
| | 10 | 159 | | public static readonly Country Mauritius = new(480, nameof(Mauritius), "mu", "mus", Continent.Africa); |
| | 10 | 160 | | public static readonly Country Mexico = new(484, nameof(Mexico), "mx", "mex", Continent.NorthAmerica); |
| | 10 | 161 | | public static readonly Country Monaco = new(492, nameof(Monaco), "mc", "mco", Continent.Europe); |
| | 10 | 162 | | public static readonly Country Mongolia = new(496, nameof(Mongolia), "mn", "mng", Continent.Asia); |
| | 10 | 163 | | public static readonly Country Moldova = new(498, nameof(Moldova), "md", "mda", Continent.Europe); |
| | 10 | 164 | | public static readonly Country Montenegro = new(499, nameof(Montenegro), "me", "mne", Continent.Europe); |
| | 10 | 165 | | public static readonly Country Montserrat = new(500, nameof(Montserrat), "ms", "msr", Continent.NorthAmerica); |
| | 10 | 166 | | public static readonly Country Morocco = new(504, nameof(Morocco), "ma", "mar", Continent.Africa); |
| | 10 | 167 | | public static readonly Country Mozambique = new(508, nameof(Mozambique), "mz", "moz", Continent.Africa); |
| | 10 | 168 | | public static readonly Country Oman = new(512, nameof(Oman), "om", "omn", Continent.Asia); |
| | 10 | 169 | | public static readonly Country Namibia = new(516, nameof(Namibia), "na", "nam", Continent.Africa); |
| | 10 | 170 | | public static readonly Country Nauru = new(520, nameof(Nauru), "nr", "nru", Continent.Oceania); |
| | 10 | 171 | | public static readonly Country Nepal = new(524, nameof(Nepal), "np", "npl", Continent.Asia); |
| | 10 | 172 | | public static readonly Country Netherlands = new(528, nameof(Netherlands), "nl", "nld", Continent.Europe); |
| | 10 | 173 | | public static readonly Country Curacao = new(531, nameof(Curacao), "cw", "cuw", Continent.SouthAmerica); |
| | 10 | 174 | | public static readonly Country Aruba = new(533, nameof(Aruba), "aw", "abw", Continent.SouthAmerica); |
| | 10 | 175 | | public static readonly Country SintMaarten = new(534, nameof(SintMaarten), "sx", "sxm", Continent.NorthAmerica); |
| | 10 | 176 | | public static readonly Country Bonaire = new(535, nameof(Bonaire), "bq", "bes", Continent.SouthAmerica); |
| | 10 | 177 | | public static readonly Country NewCaledonia = new(540, nameof(NewCaledonia), "nc", "ncl", Continent.Oceania); |
| | 10 | 178 | | public static readonly Country Vanuatu = new(548, nameof(Vanuatu), "vu", "vut", Continent.Asia); |
| | 10 | 179 | | public static readonly Country NewZealand = new(554, nameof(NewZealand), "nz", "nzl", Continent.Asia); |
| | 10 | 180 | | public static readonly Country Nicaragua = new(558, nameof(Nicaragua), "ni", "nic", Continent.NorthAmerica); |
| | 10 | 181 | | public static readonly Country Niger = new(562, nameof(Niger), "ne", "ner", Continent.Africa); |
| | 10 | 182 | | public static readonly Country Nigeria = new(566, nameof(Nigeria), "ng", "nga", Continent.Africa); |
| | 10 | 183 | | public static readonly Country Niue = new(570, nameof(Niue), "nu", "niu", Continent.Oceania); |
| | 10 | 184 | | public static readonly Country NorfolkIsland = new(574, nameof(NorfolkIsland), "nf", "nfk", Continent.Oceania); |
| | 10 | 185 | | public static readonly Country Norway = new(578, nameof(Norway), "no", "nor", Continent.Europe); |
| | 10 | 186 | | public static readonly Country NorthernMarianaIslands = new(580, nameof(NorthernMarianaIslands), "mp", "mnp", Contin |
| | 10 | 187 | | public static readonly Country UnitedStatesMinorOutlyingIslands = new(581, nameof(UnitedStatesMinorOutlyingIslands), |
| | 10 | 188 | | public static readonly Country Micronesia = new(583, nameof(Micronesia), "fm", "fsm", Continent.Oceania); |
| | 10 | 189 | | public static readonly Country MarshallIslands = new(584, nameof(MarshallIslands), "mh", "mhl", Continent.Oceania); |
| | 10 | 190 | | public static readonly Country Palau = new(585, nameof(Palau), "pw", "plw", Continent.Oceania); |
| | 10 | 191 | | public static readonly Country Pakistan = new(586, nameof(Pakistan), "pk", "pak", Continent.Asia); |
| | 10 | 192 | | public static readonly Country Panama = new(591, nameof(Panama), "pa", "pan", Continent.NorthAmerica); |
| | 10 | 193 | | public static readonly Country PapuaNewGuinea = new(598, nameof(PapuaNewGuinea), "pg", "png", Continent.Oceania); |
| | 10 | 194 | | public static readonly Country Paraguay = new(600, nameof(Paraguay), "py", "pry", Continent.SouthAmerica); |
| | 10 | 195 | | public static readonly Country Peru = new(604, nameof(Peru), "pe", "per", Continent.SouthAmerica); |
| | 10 | 196 | | public static readonly Country Philippines = new(608, nameof(Philippines), "ph", "phl", Continent.Asia); |
| | 10 | 197 | | public static readonly Country Pitcairn = new(612, nameof(Pitcairn), "pn", "pcn", Continent.Oceania); |
| | 10 | 198 | | public static readonly Country Poland = new(616, nameof(Poland), "pl", "pol", Continent.Europe); |
| | 10 | 199 | | public static readonly Country Portugal = new(620, nameof(Portugal), "pt", "prt", Continent.Europe); |
| | 10 | 200 | | public static readonly Country GuineaBissau = new(624, nameof(GuineaBissau), "gw", "gnb", Continent.Africa); |
| | 10 | 201 | | public static readonly Country TimorLeste = new(626, nameof(TimorLeste), "tl", "tls", Continent.Asia); |
| | 10 | 202 | | public static readonly Country PuertoRico = new(630, nameof(PuertoRico), "pr", "pri", Continent.NorthAmerica); |
| | 10 | 203 | | public static readonly Country Qatar = new(634, nameof(Qatar), "qa", "qat", Continent.Asia); |
| | 10 | 204 | | public static readonly Country Reunion = new(638, nameof(Reunion), "re", "reu", Continent.Africa); |
| | 10 | 205 | | public static readonly Country Romania = new(642, nameof(Romania), "ro", "rou", Continent.Europe); |
| | 10 | 206 | | public static readonly Country RussianFederation = new(643, nameof(RussianFederation), "ru", "rus", Continent.Europe |
| | 10 | 207 | | public static readonly Country Rwanda = new(646, nameof(Rwanda), "rw", "rwa", Continent.Africa); |
| | 10 | 208 | | public static readonly Country SaintBartheLemy = new(652, nameof(SaintBartheLemy), "bl", "blm", Continent.NorthAmeri |
| | 10 | 209 | | public static readonly Country SaintHelena = new(654, nameof(SaintHelena), "sh", "shn", Continent.Africa); |
| | 10 | 210 | | public static readonly Country SaintKittsAndNevis = new(659, nameof(SaintKittsAndNevis), "kn", "kna", Continent.Nort |
| | 10 | 211 | | public static readonly Country Anguilla = new(66, nameof(Anguilla), "ai", "aia", Continent.NorthAmerica); |
| | 10 | 212 | | public static readonly Country SaintLucia = new(662, nameof(SaintLucia), "lc", "lca", Continent.NorthAmerica); |
| | 10 | 213 | | public static readonly Country SaintMartin = new(663, nameof(SaintMartin), "mf", "maf", Continent.NorthAmerica); |
| | 10 | 214 | | public static readonly Country SaintPierreAndMiquelon = new(666, nameof(SaintPierreAndMiquelon), "pm", "spm", Contin |
| | 10 | 215 | | public static readonly Country SaintVincentAndTheGrenadines = new(670, nameof(SaintVincentAndTheGrenadines), "vc", " |
| | 10 | 216 | | public static readonly Country SanMarino = new(674, nameof(SanMarino), "sm", "smr", Continent.Europe); |
| | 10 | 217 | | public static readonly Country SaoTomeAndPrincipe = new(678, nameof(SaoTomeAndPrincipe), "st", "stp", Continent.Afri |
| | 10 | 218 | | public static readonly Country SaudiArabia = new(682, nameof(SaudiArabia), "sa", "sau", Continent.Asia); |
| | 10 | 219 | | public static readonly Country Senegal = new(686, nameof(Senegal), "sn", "sen", Continent.Africa); |
| | 10 | 220 | | public static readonly Country Serbia = new(688, nameof(Serbia), "rs", "srb", Continent.Europe); |
| | 10 | 221 | | public static readonly Country Seychelles = new(690, nameof(Seychelles), "sc", "syc", Continent.Africa); |
| | 10 | 222 | | public static readonly Country SierraLeone = new(694, nameof(SierraLeone), "sl", "sle", Continent.Africa); |
| | 10 | 223 | | public static readonly Country Singapore = new(702, nameof(Singapore), "sg", "sgp", Continent.Asia); |
| | 10 | 224 | | public static readonly Country Slovakia = new(703, nameof(Slovakia), "sk", "svk", Continent.Europe); |
| | 10 | 225 | | public static readonly Country VietNam = new(704, nameof(VietNam), "vn", "vnm", Continent.Asia); |
| | 10 | 226 | | public static readonly Country Slovenia = new(705, nameof(Slovenia), "si", "svn", Continent.Europe); |
| | 10 | 227 | | public static readonly Country Somalia = new(706, nameof(Somalia), "so", "som", Continent.Africa); |
| | 10 | 228 | | public static readonly Country SouthAfrica = new(710, nameof(SouthAfrica), "za", "zaf", Continent.Africa); |
| | 10 | 229 | | public static readonly Country Zimbabwe = new(716, nameof(Zimbabwe), "zw", "zwe", Continent.Africa); |
| | 10 | 230 | | public static readonly Country Spain = new(724, nameof(Spain), "es", "esp", Continent.Europe); |
| | 10 | 231 | | public static readonly Country SouthSudan = new(728, nameof(SouthSudan), "ss", "ssd", Continent.Africa); |
| | 10 | 232 | | public static readonly Country Sudan = new(729, nameof(Sudan), "sd", "sdn", Continent.Africa); |
| | 10 | 233 | | public static readonly Country WesternSahara = new(732, nameof(WesternSahara), "eh", "esh", Continent.Africa); |
| | 10 | 234 | | public static readonly Country Suriname = new(740, nameof(Suriname), "sr", "sur", Continent.Asia); |
| | 10 | 235 | | public static readonly Country SvalbardAndJanMayen = new(744, nameof(SvalbardAndJanMayen), "sj", "sjm", Continent.Eu |
| | 10 | 236 | | public static readonly Country Eswatini = new(748, nameof(Eswatini), "sz", "swz", Continent.Africa); |
| | 10 | 237 | | public static readonly Country Sweden = new(752, nameof(Sweden), "se", "swe", Continent.Europe); |
| | 10 | 238 | | public static readonly Country Switzerland = new(756, nameof(Switzerland), "ch", "che", Continent.Europe); |
| | 10 | 239 | | public static readonly Country SyrianArabRepublic = new(760, nameof(SyrianArabRepublic), "sy", "syr", Continent.Asia |
| | 10 | 240 | | public static readonly Country Tajikistan = new(762, nameof(Tajikistan), "tj", "tjk", Continent.Asia); |
| | 10 | 241 | | public static readonly Country Thailand = new(764, nameof(Thailand), "th", "tha", Continent.Asia); |
| | 10 | 242 | | public static readonly Country Togo = new(768, nameof(Togo), "tg", "tgo", Continent.Africa); |
| | 10 | 243 | | public static readonly Country Tokelau = new(772, nameof(Tokelau), "tk", "tkl", Continent.Oceania); |
| | 10 | 244 | | public static readonly Country Tonga = new(776, nameof(Tonga), "to", "ton", Continent.Oceania); |
| | 10 | 245 | | public static readonly Country TrinidadAndTobago = new(780, nameof(TrinidadAndTobago), "tt", "tto", Continent.SouthA |
| | 10 | 246 | | public static readonly Country UnitedArabEmirates = new(784, nameof(UnitedArabEmirates), "ae", "are", Continent.Asia |
| | 10 | 247 | | public static readonly Country Tunisia = new(788, nameof(Tunisia), "tn", "tun", Continent.Africa); |
| | 10 | 248 | | public static readonly Country Turkey = new(792, nameof(Turkey), "tr", "tur", Continent.Europe); |
| | 10 | 249 | | public static readonly Country Turkmenistan = new(795, nameof(Turkmenistan), "tm", "tkm", Continent.Asia); |
| | 10 | 250 | | public static readonly Country TurksAndCaicosIslands = new(796, nameof(TurksAndCaicosIslands), "tc", "tca", Continen |
| | 10 | 251 | | public static readonly Country Tuvalu = new(798, nameof(Tuvalu), "tv", "tuv", Continent.Asia); |
| | 10 | 252 | | public static readonly Country Uganda = new(800, nameof(Uganda), "ug", "uga", Continent.Africa); |
| | 10 | 253 | | public static readonly Country Ukraine = new(804, nameof(Ukraine), "ua", "ukr", Continent.Europe); |
| | 10 | 254 | | public static readonly Country NorthMacedonia = new(807, nameof(NorthMacedonia), "mk", "mkd", Continent.Europe); |
| | 10 | 255 | | public static readonly Country Egypt = new(818, nameof(Egypt), "eg", "egy", Continent.Africa); |
| | 10 | 256 | | public static readonly Country UnitedKingdomOfGreatBritainAndNorthernIreland = new(826, nameof(UnitedKingdomOfGreatB |
| | 10 | 257 | | public static readonly Country Guernsey = new(831, nameof(Guernsey), "gg", "ggy", Continent.Europe); |
| | 10 | 258 | | public static readonly Country Jersey = new(832, nameof(Jersey), "je", "jey", Continent.Europe); |
| | 10 | 259 | | public static readonly Country IsleOfMan = new(833, nameof(IsleOfMan), "im", "imn", Continent.Europe); |
| | 10 | 260 | | public static readonly Country Tanzania = new(834, nameof(Tanzania), "tz", "tza", Continent.Africa); |
| | 10 | 261 | | public static readonly Country UnitedStatesOfAmerica = new(840, nameof(UnitedStatesOfAmerica), "us", "usa", Continen |
| | | 262 | | [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Country name contains 'UK' as per ISO 3166 stan |
| | 10 | 263 | | public static readonly Country VirginIslandsUS = new(850, nameof(VirginIslandsUS), "vi", "vir", Continent.NorthAmeri |
| | 10 | 264 | | public static readonly Country BurkinaFaso = new(854, nameof(BurkinaFaso), "bf", "bfa", Continent.Africa); |
| | 10 | 265 | | public static readonly Country Uruguay = new(855, nameof(Uruguay), "uy", "ury", Continent.SouthAmerica); |
| | 10 | 266 | | public static readonly Country Uzbekistan = new(860, nameof(Uzbekistan), "uz", "uzb", Continent.Asia); |
| | 10 | 267 | | public static readonly Country Venezuela = new(862, nameof(Venezuela), "ve", "ven", Continent.SouthAmerica); |
| | 10 | 268 | | public static readonly Country WallisAndFutuna = new(876, nameof(WallisAndFutuna), "wf", "wlf", Continent.Oceania); |
| | 10 | 269 | | public static readonly Country Samoa = new(882, nameof(Samoa), "ws", "wsm", Continent.Asia); |
| | 10 | 270 | | public static readonly Country Yemen = new(887, nameof(Yemen), "ye", "yem", Continent.Asia); |
| | 10 | 271 | | public static readonly Country Zambia = new(894, nameof(Zambia), "zm", "zmb", Continent.Africa); |
| | | 272 | | |
| | | 273 | | /// <summary> |
| | | 274 | | /// Initializes a new instance of the <see cref="Country"/> class with the specified ISO code, name, alpha-2 code, a |
| | | 275 | | /// </summary> |
| | | 276 | | /// <param name="iso">The ISO code of the country.</param> |
| | | 277 | | /// <param name="name">The name of the country.</param> |
| | | 278 | | /// <param name="alpha2">The alpha-2 code of the country.</param> |
| | | 279 | | /// <param name="alpha3">The alpha-3 code of the country.</param> |
| | | 280 | | /// <param name="continent">The continent of the country.</param> |
| | | 281 | | private Country(int iso, string name, string alpha2, string alpha3, Continent continent) |
| | 2490 | 282 | | : base(name) |
| | 2490 | 283 | | => (Iso, Alpha2, Alpha3, Continent) = (iso, alpha2, alpha3, continent); |
| | | 284 | | |
| | | 285 | | /// <summary> |
| | | 286 | | /// Gets the ISO 3166 numeric code that uniquely identifies the country. |
| | | 287 | | /// </summary> |
| | | 288 | | /// <remarks>The ISO code is a standardized numeric identifier as defined by the ISO 3166-1 specification. |
| | | 289 | | /// This value is commonly used for interoperability with external systems and data formats that require country |
| | | 290 | | /// codes.</remarks> |
| | | 291 | | public int Iso { get; } |
| | | 292 | | |
| | | 293 | | /// <summary> |
| | | 294 | | /// Gets the two-letter country code as defined by ISO 3166-1 alpha-2. |
| | | 295 | | /// </summary> |
| | | 296 | | public string Alpha2 { get; } |
| | | 297 | | |
| | | 298 | | /// <summary> |
| | | 299 | | /// Gets the three-letter country code as defined by ISO 3166-1. |
| | | 300 | | /// </summary> |
| | | 301 | | public string Alpha3 { get; } |
| | | 302 | | |
| | | 303 | | /// <summary> |
| | | 304 | | /// Gets the continent associated with the current instance. |
| | | 305 | | /// </summary> |
| | | 306 | | public Continent Continent { get; } |
| | | 307 | | } |
| | | 308 | | |