public CountryController(IGeographyService context) { _context = context; }
public GeographyCrawler(CrawlOptions crawlOptions, IGeographyService geographyService) : base(crawlOptions) { _geographyService = geographyService; }
public GeographyHostedService(ILogger <GeographyHostedService> logger, GeographyCrawler crawler, IGeographyService geographyService) { _logger = logger; _crawler = crawler; _geographyService = geographyService; }
public RegionController(IGeographyService context) { _context = context; }
public StateController(IGeographyService context) { _context = context; }
public GeographyController(IGeographyService geographyService) { this.geographyService = geographyService; }
public Geography(IGeographyService geographyService) : this() { this.GeographyService = geographyService; }
public static void GeocodeOrgUnit(OrgUnit orgUnit, IGeographyService geographyService, string completeAddress, bool forceGeocode) { try { var IsInvalidLatLongValues = IsInvalidLatLong(orgUnit.Latitude, orgUnit.Longitude); if (forceGeocode || IsInvalidLatLongValues) { var latLonPair = geographyService.GeocodeAddress(completeAddress); if (latLonPair != null) { orgUnit.Latitude = string.IsNullOrEmpty(latLonPair.Latitude) ? new decimal?() : decimal.Parse(latLonPair.Latitude, CultureInfo.InvariantCulture); orgUnit.Longitude = string.IsNullOrEmpty(latLonPair.Longitude) ? new decimal?() : decimal.Parse(latLonPair.Longitude, CultureInfo.InvariantCulture); } } } catch (Exception ex) { throw new BusinessException("Error geocoding address: " + ex.Message); } }