Struct Country
- Namespace
- DatabentoDotNet.Reference
- Assembly
- DatabentoDotNet.Reference.dll
A country code — ISO 3166-1 alpha-2, with unofficial extensions Databento adds.
[JsonConverter(typeof(ReferenceCodeJsonConverter<Country>))]
public readonly record struct Country : IReferenceCode<Country>, IEquatable<Country>
- Implements
- Inherited Members
Remarks
An open set: a code this library does not know is carried, not lost. Upstream ends
this enum in an Unknown(String) variant (enums.rs:137) so a code Databento adds
next month round-trips untouched, and a C# enum cannot hold a payload. See
IReferenceCode<TSelf> for the shape this takes instead and why.
The members come from the CNTRY group of the vendored corporate_actions.list_enums response, which is the oracle rather than a count typed into an issue.
ZZ is one of the extensions and means Unclassified; it is a known code, not the absence of one.
Constructors
Country(string)
Wraps a wire code, known or not. Prefer a named member such as Aa where one exists, and From(string?) where the value came from the server.
public Country(string code)
Parameters
codestringThe wire code.
Exceptions
- ArgumentException
codeis null or empty. A blank code is the absence of a value, which is default.
Properties
Aa
Supranational (AA).
public static Country Aa { get; }
Property Value
Ad
Andorra (AD).
public static Country Ad { get; }
Property Value
Ae
United Arab Emirates (AE).
public static Country Ae { get; }
Property Value
Af
Afghanistan (AF).
public static Country Af { get; }
Property Value
Ag
Antigua and Barbuda (AG).
public static Country Ag { get; }
Property Value
Ai
Anguilla (AI).
public static Country Ai { get; }
Property Value
Al
Albania (AL).
public static Country Al { get; }
Property Value
Am
Armenia (AM).
public static Country Am { get; }
Property Value
Ao
Angola (AO).
public static Country Ao { get; }
Property Value
Ar
Argentina (AR).
public static Country Ar { get; }
Property Value
As
American Samoa (AS).
public static Country As { get; }
Property Value
At
Austria (AT).
public static Country At { get; }
Property Value
Au
Australia (AU).
public static Country Au { get; }
Property Value
Aw
Aruba (AW).
public static Country Aw { get; }
Property Value
Az
Azerbaijan (AZ).
public static Country Az { get; }
Property Value
Ba
Bosnia and Herzegovina (BA).
public static Country Ba { get; }
Property Value
Bb
Barbados (BB).
public static Country Bb { get; }
Property Value
Bd
Bangladesh (BD).
public static Country Bd { get; }
Property Value
Be
Belgium (BE).
public static Country Be { get; }
Property Value
Bf
Burkina Faso (BF).
public static Country Bf { get; }
Property Value
Bg
Bulgaria (BG).
public static Country Bg { get; }
Property Value
Bh
Bahrain (BH).
public static Country Bh { get; }
Property Value
Bi
Burundi (BI).
public static Country Bi { get; }
Property Value
Bj
Benin (BJ).
public static Country Bj { get; }
Property Value
Bm
Bermuda (BM).
public static Country Bm { get; }
Property Value
Bn
Brunei Darussalam (BN).
public static Country Bn { get; }
Property Value
Bo
Bolivia (BO).
public static Country Bo { get; }
Property Value
Br
Brazil (BR).
public static Country Br { get; }
Property Value
Bs
Bahamas (BS).
public static Country Bs { get; }
Property Value
Bt
Bhutan (BT).
public static Country Bt { get; }
Property Value
Bv
Bouvet Island (BV).
public static Country Bv { get; }
Property Value
Bw
Botswana (BW).
public static Country Bw { get; }
Property Value
By
Belarus (BY).
public static Country By { get; }
Property Value
Bz
Belize (BZ).
public static Country Bz { get; }
Property Value
Ca
Canada (CA).
public static Country Ca { get; }
Property Value
Cc
Cocos Islands (CC).
public static Country Cc { get; }
Property Value
Cd
Congo Democratic Republic (CD).
public static Country Cd { get; }
Property Value
Cf
Central African Republic (CF).
public static Country Cf { get; }
Property Value
Cg
Congo (CG).
public static Country Cg { get; }
Property Value
Ch
Switzerland (CH).
public static Country Ch { get; }
Property Value
Ci
Ivory Coast (CI).
public static Country Ci { get; }
Property Value
Ck
Cook Islands (CK).
public static Country Ck { get; }
Property Value
Cl
Chile (CL).
public static Country Cl { get; }
Property Value
Cm
Cameroon (CM).
public static Country Cm { get; }
Property Value
Cn
China (CN).
public static Country Cn { get; }
Property Value
Co
Colombia (CO).
public static Country Co { get; }
Property Value
Code
The wire code, or null when this names no value.
public string? Code { get; }
Property Value
Cr
Costa Rica (CR).
public static Country Cr { get; }
Property Value
Cu
Cuba (CU).
public static Country Cu { get; }
Property Value
Cv
Cape Verde (CV).
public static Country Cv { get; }
Property Value
Cw
Curaçao (CW).
public static Country Cw { get; }
Property Value
Cx
Christmas Islands (CX).
public static Country Cx { get; }
Property Value
Cy
Cyprus (CY).
public static Country Cy { get; }
Property Value
Cz
Czech Republic (CZ).
public static Country Cz { get; }
Property Value
De
Germany (DE).
public static Country De { get; }
Property Value
Dj
Djibouti (DJ).
public static Country Dj { get; }
Property Value
Dk
Denmark (DK).
public static Country Dk { get; }
Property Value
Dm
Dominica (DM).
public static Country Dm { get; }
Property Value
Do
Dominican Republic (DO).
public static Country Do { get; }
Property Value
Dz
Algeria (DZ).
public static Country Dz { get; }
Property Value
Ec
Ecuador (EC).
public static Country Ec { get; }
Property Value
Ee
Estonia (EE).
public static Country Ee { get; }
Property Value
Eg
Egypt (EG).
public static Country Eg { get; }
Property Value
Eh
Western Sahara (EH).
public static Country Eh { get; }
Property Value
Es
Spain (ES).
public static Country Es { get; }
Property Value
Et
Ethiopia (ET).
public static Country Et { get; }
Property Value
Eu
Europe (EU).
public static Country Eu { get; }
Property Value
Fi
Finland (FI).
public static Country Fi { get; }
Property Value
Fj
Fiji (FJ).
public static Country Fj { get; }
Property Value
Fk
Falkland Islands (FK).
public static Country Fk { get; }
Property Value
Fm
Micronesia (FM).
public static Country Fm { get; }
Property Value
Fo
Faroe Islands (FO).
public static Country Fo { get; }
Property Value
Fr
France (FR).
public static Country Fr { get; }
Property Value
Ga
Gabon (GA).
public static Country Ga { get; }
Property Value
Gb
United Kingdom (GB).
public static Country Gb { get; }
Property Value
Gd
Grenada (GD).
public static Country Gd { get; }
Property Value
Ge
Georgia (GE).
public static Country Ge { get; }
Property Value
Gf
French Guyana (GF).
public static Country Gf { get; }
Property Value
Gg
Guernsey (GG).
public static Country Gg { get; }
Property Value
Gh
Ghana (GH).
public static Country Gh { get; }
Property Value
Gi
Gibraltar (GI).
public static Country Gi { get; }
Property Value
Gl
Greenland (GL).
public static Country Gl { get; }
Property Value
Gm
Gambia (GM).
public static Country Gm { get; }
Property Value
Gn
Guinea (GN).
public static Country Gn { get; }
Property Value
Gp
Guadeloupe (GP).
public static Country Gp { get; }
Property Value
Gq
Equatorial Guinea (GQ).
public static Country Gq { get; }
Property Value
Gr
Greece (GR).
public static Country Gr { get; }
Property Value
Gt
Guatemala (GT).
public static Country Gt { get; }
Property Value
Gu
Guam (GU).
public static Country Gu { get; }
Property Value
Gw
Guinea-Bissau (GW).
public static Country Gw { get; }
Property Value
Gy
Guyana (GY).
public static Country Gy { get; }
Property Value
HasValue
true when this names a code — known or not.
public bool HasValue { get; }
Property Value
Hk
Hong Kong (HK).
public static Country Hk { get; }
Property Value
Hm
Heard Island & McDonald Island (HM).
public static Country Hm { get; }
Property Value
Hn
Honduras (HN).
public static Country Hn { get; }
Property Value
Hr
Croatia (HR).
public static Country Hr { get; }
Property Value
Ht
Haiti (HT).
public static Country Ht { get; }
Property Value
Hu
Hungary (HU).
public static Country Hu { get; }
Property Value
Id
Indonesia (ID).
public static Country Id { get; }
Property Value
Ie
Ireland (IE).
public static Country Ie { get; }
Property Value
Il
Israel (IL).
public static Country Il { get; }
Property Value
Im
Isle of Man (IM).
public static Country Im { get; }
Property Value
In
India (IN).
public static Country In { get; }
Property Value
Io
British Indian Ocean territory (IO).
public static Country Io { get; }
Property Value
Iq
Iraq (IQ).
public static Country Iq { get; }
Property Value
Ir
Iran (IR).
public static Country Ir { get; }
Property Value
Is
Iceland (IS).
public static Country Is { get; }
Property Value
IsKnown
true when Code is one of KnownCodes.
public bool IsKnown { get; }
Property Value
Remarks
false is not an error. It means the server sent something newer than the table this library shipped with, and the code is still in Code to be read, logged, or sent back in a filter.
It
Italy (IT).
public static Country It { get; }
Property Value
Je
Jersey (JE).
public static Country Je { get; }
Property Value
Jm
Jamaica (JM).
public static Country Jm { get; }
Property Value
Jo
Jordan (JO).
public static Country Jo { get; }
Property Value
Jp
Japan (JP).
public static Country Jp { get; }
Property Value
Ke
Kenya (KE).
public static Country Ke { get; }
Property Value
Kg
Kyrgyz Republic (KG).
public static Country Kg { get; }
Property Value
Kh
Cambodia (KH).
public static Country Kh { get; }
Property Value
Ki
Kiribati (KI).
public static Country Ki { get; }
Property Value
Km
Comoros (KM).
public static Country Km { get; }
Property Value
Kn
St. Kitts & Nevis (KN).
public static Country Kn { get; }
Property Value
KnownCodes
Every code the reference API reported for this type when the fixture was captured — 246 of them.
public static IReadOnlySet<string> KnownCodes { get; }
Property Value
Kp
Korea (North) (KP).
public static Country Kp { get; }
Property Value
Kr
Korea (South) (KR).
public static Country Kr { get; }
Property Value
Kw
Kuwait (KW).
public static Country Kw { get; }
Property Value
Ky
Cayman Islands (KY).
public static Country Ky { get; }
Property Value
Kz
Kazakhstan (KZ).
public static Country Kz { get; }
Property Value
La
Laos (LA).
public static Country La { get; }
Property Value
Lb
Lebanon (LB).
public static Country Lb { get; }
Property Value
Lc
St. Lucia (LC).
public static Country Lc { get; }
Property Value
Li
Liechtenstein (LI).
public static Country Li { get; }
Property Value
Lk
Sri Lanka (LK).
public static Country Lk { get; }
Property Value
Lr
Liberia (LR).
public static Country Lr { get; }
Property Value
Ls
Lesotho (LS).
public static Country Ls { get; }
Property Value
Lt
Lithuania (LT).
public static Country Lt { get; }
Property Value
Lu
Luxembourg (LU).
public static Country Lu { get; }
Property Value
Lv
Latvia (LV).
public static Country Lv { get; }
Property Value
Ly
Libya (LY).
public static Country Ly { get; }
Property Value
Ma
Morocco (MA).
public static Country Ma { get; }
Property Value
Mc
Monaco (MC).
public static Country Mc { get; }
Property Value
Md
Moldova (MD).
public static Country Md { get; }
Property Value
Me
Montenegro (ME).
public static Country Me { get; }
Property Value
Mg
Madagascar (MG).
public static Country Mg { get; }
Property Value
Mh
Marshall Islands (MH).
public static Country Mh { get; }
Property Value
Mk
North Macedonia (MK).
public static Country Mk { get; }
Property Value
Ml
Mali (ML).
public static Country Ml { get; }
Property Value
Mm
Myanmar (MM).
public static Country Mm { get; }
Property Value
Mn
Mongolia (MN).
public static Country Mn { get; }
Property Value
Mo
Macao (MO).
public static Country Mo { get; }
Property Value
Mp
Northern Mariana Islands (MP).
public static Country Mp { get; }
Property Value
Mq
Martinique (MQ).
public static Country Mq { get; }
Property Value
Mr
Mauritania (MR).
public static Country Mr { get; }
Property Value
Ms
Montserrat (MS).
public static Country Ms { get; }
Property Value
Mt
Malta (MT).
public static Country Mt { get; }
Property Value
Mu
Mauritius (MU).
public static Country Mu { get; }
Property Value
Mv
Maldives (MV).
public static Country Mv { get; }
Property Value
Mw
Malawi (MW).
public static Country Mw { get; }
Property Value
Mx
Mexico (MX).
public static Country Mx { get; }
Property Value
My
Malaysia (MY).
public static Country My { get; }
Property Value
Mz
Mozambique (MZ).
public static Country Mz { get; }
Property Value
Na
Namibia (NA).
public static Country Na { get; }
Property Value
Nc
New Caledonia (NC).
public static Country Nc { get; }
Property Value
Ne
Niger (NE).
public static Country Ne { get; }
Property Value
Nf
Norfolk Island (NF).
public static Country Nf { get; }
Property Value
Ng
Nigeria (NG).
public static Country Ng { get; }
Property Value
Ni
Nicaragua (NI).
public static Country Ni { get; }
Property Value
Nl
Netherlands (NL).
public static Country Nl { get; }
Property Value
No
Norway (NO).
public static Country No { get; }
Property Value
Np
Nepal (NP).
public static Country Np { get; }
Property Value
Nr
Nauru (NR).
public static Country Nr { get; }
Property Value
Nu
Niue (NU).
public static Country Nu { get; }
Property Value
Nz
New Zealand (NZ).
public static Country Nz { get; }
Property Value
Om
Oman (OM).
public static Country Om { get; }
Property Value
Pa
Panama (PA).
public static Country Pa { get; }
Property Value
Pe
Peru (PE).
public static Country Pe { get; }
Property Value
Pf
French Polynesia (PF).
public static Country Pf { get; }
Property Value
Pg
Papua New Guinea (PG).
public static Country Pg { get; }
Property Value
Ph
Philippines (PH).
public static Country Ph { get; }
Property Value
Pk
Pakistan (PK).
public static Country Pk { get; }
Property Value
Pl
Poland (PL).
public static Country Pl { get; }
Property Value
Pm
St. Pierre and Miquelon (PM).
public static Country Pm { get; }
Property Value
Pn
Pitcairn (PN).
public static Country Pn { get; }
Property Value
Pr
Puerto Rico (PR).
public static Country Pr { get; }
Property Value
Ps
Palestine (PS).
public static Country Ps { get; }
Property Value
Pt
Portugal (PT).
public static Country Pt { get; }
Property Value
Pw
Palau (PW).
public static Country Pw { get; }
Property Value
Py
Paraguay (PY).
public static Country Py { get; }
Property Value
Qa
Qatar (QA).
public static Country Qa { get; }
Property Value
Re
Reunion (RE).
public static Country Re { get; }
Property Value
Ro
Romania (RO).
public static Country Ro { get; }
Property Value
Rs
Serbia (RS).
public static Country Rs { get; }
Property Value
Ru
Russia (RU).
public static Country Ru { get; }
Property Value
Rw
Rwanda (RW).
public static Country Rw { get; }
Property Value
Sa
Saudi Arabia (SA).
public static Country Sa { get; }
Property Value
Sb
Solomon Islands (SB).
public static Country Sb { get; }
Property Value
Sc
Seychelles (SC).
public static Country Sc { get; }
Property Value
Sd
Sudan (SD).
public static Country Sd { get; }
Property Value
Se
Sweden (SE).
public static Country Se { get; }
Property Value
Sg
Singapore (SG).
public static Country Sg { get; }
Property Value
Sh
St. Helena (SH).
public static Country Sh { get; }
Property Value
Si
Slovenia (SI).
public static Country Si { get; }
Property Value
Sj
Svalbard and Jan Mayen (SJ).
public static Country Sj { get; }
Property Value
Sk
Slovak Republic (SK).
public static Country Sk { get; }
Property Value
Sl
Sierra Leone (SL).
public static Country Sl { get; }
Property Value
Sm
San Marino (SM).
public static Country Sm { get; }
Property Value
Sn
Senegal (SN).
public static Country Sn { get; }
Property Value
So
Somalia (SO).
public static Country So { get; }
Property Value
Sr
Suriname (SR).
public static Country Sr { get; }
Property Value
St
Sao Tome and Principe (ST).
public static Country St { get; }
Property Value
Sv
El Salvador (SV).
public static Country Sv { get; }
Property Value
Sy
Syria (SY).
public static Country Sy { get; }
Property Value
Sz
Eswatini (SZ).
public static Country Sz { get; }
Property Value
Tc
Turks and Caicos Islands (TC).
public static Country Tc { get; }
Property Value
Td
Chad (TD).
public static Country Td { get; }
Property Value
Tf
French Southern Territories (TF).
public static Country Tf { get; }
Property Value
Tg
Togo (TG).
public static Country Tg { get; }
Property Value
Th
Thailand (TH).
public static Country Th { get; }
Property Value
Tj
Tajikistan (TJ).
public static Country Tj { get; }
Property Value
Tk
Tokelau (TK).
public static Country Tk { get; }
Property Value
Tm
Turkmenistan (TM).
public static Country Tm { get; }
Property Value
Tn
Tunisia (TN).
public static Country Tn { get; }
Property Value
To
Tonga (TO).
public static Country To { get; }
Property Value
Tp
East Timor (TP).
public static Country Tp { get; }
Property Value
Tr
Turkiye (TR).
public static Country Tr { get; }
Property Value
Tt
Trinidad and Tobago (TT).
public static Country Tt { get; }
Property Value
Tv
Tuvalu (TV).
public static Country Tv { get; }
Property Value
Tw
Taiwan (TW).
public static Country Tw { get; }
Property Value
Tz
Tanzania (TZ).
public static Country Tz { get; }
Property Value
Ua
Ukraine (UA).
public static Country Ua { get; }
Property Value
Ug
Uganda (UG).
public static Country Ug { get; }
Property Value
Um
United States Minor Outlying (UM).
public static Country Um { get; }
Property Value
Us
United States of America (US).
public static Country Us { get; }
Property Value
Uy
Uruguay (UY).
public static Country Uy { get; }
Property Value
Uz
Uzbekistan (UZ).
public static Country Uz { get; }
Property Value
Va
Vatican City (VA).
public static Country Va { get; }
Property Value
Vc
St. Vincent & the Grenadines (VC).
public static Country Vc { get; }
Property Value
Ve
Venezuela (VE).
public static Country Ve { get; }
Property Value
Vg
Virgin Islands (UK) (VG).
public static Country Vg { get; }
Property Value
Vi
Virgin Islands (US) (VI).
public static Country Vi { get; }
Property Value
Vn
Vietnam (VN).
public static Country Vn { get; }
Property Value
Vu
Vanuatu (VU).
public static Country Vu { get; }
Property Value
Wf
Wallis & Futuna Islands (WF).
public static Country Wf { get; }
Property Value
Ws
Samoa (WS).
public static Country Ws { get; }
Property Value
Xg
Shanghai SC (XG).
public static Country Xg { get; }
Property Value
Xh
Hong Kong SC (XH).
public static Country Xh { get; }
Property Value
Xz
Shenzhen SC (XZ).
public static Country Xz { get; }
Property Value
Ye
Yemen (YE).
public static Country Ye { get; }
Property Value
Yt
Mayotte (YT).
public static Country Yt { get; }
Property Value
Za
South Africa (ZA).
public static Country Za { get; }
Property Value
Zm
Zambia (ZM).
public static Country Zm { get; }
Property Value
Zw
Zimbabwe (ZW).
public static Country Zw { get; }
Property Value
Zz
Unclassified (ZZ).
public static Country Zz { get; }
Property Value
Methods
From(string?)
public static Country From(string? code)
Parameters
Returns
- Country
The value.
ToString()
The wire code, or the empty string when this names no value.
public override string ToString()
Returns
- string
The wire code.