private async Task PopulateGeolocation(GetARyderAddress address, GetARyderLatitudeLongitude geolocation) { var geoRequest = new GeolocatorRequest { Address = address }; var geoResponse = await GeolocatorGateway.GetGeolocationFromAddress(geoRequest); geolocation.Latitude = geoResponse.LatitudeLongitude.Latitude; geolocation.Longitude = geoResponse.LatitudeLongitude.Longitude; }
public async Task <GeolocatorResponse> GetGeolocationFromAddress(GeolocatorRequest geolocatorRequest) => await GetGeolocationFromAddressCore(geolocatorRequest);
protected abstract Task <GeolocatorResponse> GetGeolocationFromAddressCore(GeolocatorRequest geolocatorRequest);
protected override async Task <GeolocatorResponse> GetGeolocationFromAddressCore(GeolocatorRequest geolocatorRequest) { var mapquestUrl = GetFullMapquestUrl(geolocatorRequest.Address); var mapquestResponse = await QueryMapquestForGeolocation(mapquestUrl); return(CreateGeolocationResponse(mapquestResponse)); }