private GeoAddress[] FilterGeoCodingResults(GeoAddress[] resultsToFilter) { if (!ShouldFilterResults()) { return(resultsToFilter); } // Make sure that the geocoding results are part of the region covered by the app return(resultsToFilter.Where(result => GeographyHelper.RegionContainsCoordinate( _appSettings.Data.UpperRightLatitude.Value, // x1 _appSettings.Data.UpperRightLongitude.Value, // y1 _appSettings.Data.LowerLeftLatitude.Value, // x2 _appSettings.Data.LowerLeftLongitude.Value, // y2 result.Latitude, result.Longitude)) .ToArray()); }