Exemple #1
0
        /// <summary>
        /// Gets <see cref="CountryInfo"/> via Cosmos Region Code / CEP-1.
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static RuntimeCountryInfo GetCountryInfo(RegionCodeValue value)
        {
            if (value.IsHistoricalValue())
            {
                return(RuntimeCountryInfoCache.GetOrDefault(value));
            }

            var country = WholeWorld.Data.FirstOrDefault(x => x.Cep1CrCode == value);

            return(RuntimeCountryInfo.Of(country));
        }
Exemple #2
0
        // /// <inheritdoc />
        // public HistoricalMetadata HistoricalMetadata { get; internal set; }

        /// <inheritdoc />
        public RuntimeCountryInfo ToRuntimeModel() => RuntimeCountryInfo.Of(this);