$ show egbakou/RESTCountries.NET
RESTCountries.NET is a .NET Standard 2.1 library providing offline access to comprehensive country data. It deserializes an embedded JSON dataset (sourced from restcountries.com) into strongly-typed C# models and exposes static query methods for searching by name, code, currency, language, and more. The library requires no network calls at runtime, making it suitable for disconnected or performance-sensitive applications. It includes a full test suite, a benchmark harness, and is distributed via NuGet with automated CI/CD. The architecture is straightforward: a static `RestCountriesService` class loads data on first access and uses LINQ to answer queries. Models cover Country, Currency, Language, Flags, Maps, Translations, and other attributes. The translation support includes 24 languages via ISO 639-3 codes. Overall, it's a well-crafted, single-purpose utility library with professional engineering practices.
The LLM identified 2 files worth highlighting for reuse:
The core service that loads country data from an embedded JSON resource and provides static query methods. It demonstrates a clean pattern for embedding reference data in a library and exposing it via LINQ queries. The methods use case-insensitive matching and handle nullability properly. This pattern can be extracted for other offline data scenarios by replacing the model and data source.
Contains the `TranslationLanguage` static class with 24 constant strings for ISO 639-3 language codes. This is a reusable reference for projects that need to standardize language identifiers. It is isolated, well-documented, and can be directly copied into other .NET projects.