public static IEnumerable <GeocodingResponse> Geocode(MapsApiContext context, IEnumerable <LatLng> locations)
 {
     foreach (var location in locations)
     {
         var request = new GeocodingRequest(location, context);
         yield return(request.GetResponse());
     }
 }
        public static IEnumerable <GeocodingResponse> Geocode(MapsApiContext context, IEnumerable <string> addresses)
        {
            var request = new GeocodingRequest(context);

            foreach (var address in addresses)
            {
                request.Address = address;
                yield return(request.GetResponse());
            }
        }
        public static IEnumerable <GeocodingResponse> GeocodeAsync(MapsApiContext context, IEnumerable <LatLng> locations)
        {
            var request = new GeocodingRequest(context);

            foreach (var location in locations)
            {
                request.Location = location;
                yield return(request.GetResponseAsync());
            }
        }
        public static async Task <IEnumerable <GeocodingResponse> > GeocodeAsync(MapsApiContext context, IEnumerable <LatLng> locations)
        {
            var result  = new List <GeocodingResponse>();
            var request = new GeocodingRequest(context);

            foreach (var location in locations)
            {
                request.Location = location;
                result.Add(await request.GetResponseAsync());
            }

            return(result);
        }
        public static async Task <IEnumerable <GeocodingResponse> > GeocodeAsync(MapsApiContext context, IEnumerable <string> addresses)
        {
            var result = new List <GeocodingResponse>();

            foreach (var address in addresses)
            {
                var request = new GeocodingRequest(address, context);
                //request.Address = address;
                result.Add(await request.GetResponseAsync());
            }

            return(result);
        }