Пример #1
0
        public static bool IsEuropeanAgency(this Agency agency, IRegionsService regionsService)
        {
            Country country = agency.Country;

            if (country.GeoRegionId == null)
            {
                Logger.Warning($"Country {country.Iso} does not have region. This is required to check for European agencies.");
                return(false);
            }

            var region = regionsService.GetGeoRegion(country.GeoRegionId.Value).Result;

            return(region.Name == Constants.AgencyRegion.Europe);
        }