public IEnumerable<Address> Geocode(string address) { if (string.IsNullOrWhiteSpace(address)) throw new ArgumentException("address can not be null or empty!"); var f = new GeocodeRequest(key, address) { UseOSM = this.UseOSM }; MapQuestResponse res = Execute(f); return HandleSingleResponse(res); }
public IEnumerable <Address> Geocode(string address) { if (string.IsNullOrWhiteSpace(address)) { throw new ArgumentException("address can not be null or empty!"); } var f = new GeocodeRequest(key, address) { UseOSM = this.UseOSM }; MapQuestResponse res = Execute(f); return(HandleSingleResponse(res)); }
public async Task <IEnumerable <Address> > GeocodeAsync(string address) { if (string.IsNullOrWhiteSpace(address)) { throw new ArgumentException("address can not be null or empty!"); } var f = new GeocodeRequest(key, address) { UseOSM = this.UseOSM }; MapQuestResponse res = await Execute(f).ConfigureAwait(false); return(HandleSingleResponse(res)); }