Пример #1
0
        public Countries GetCountry(string code)
        {
            code = "CO"; //Temporary for testing - Once the parameter will be passed correctly from React, this line will be deleted
            var country = _countryRepository.GetCountryData(code);

            return(country);
        }
        private void ValidateCache(string code)
        {
            if (IsCacheValid)
            {
                return;
            }

            try
            {
                _cachedItems = _wrapperReader.GetCountryData(code);
                _dateTime    = DateTime.Now;
            }
            catch
            {
                InvalidateCache();
            }
        }