24-01-23 05:52 AM
24-01-23 10:59 AM
25-01-23 04:24 AM
var parameters = new Dictionary<string, string>();
parameters.Add("origins", JoinAndUrlEncodeLocations(Origins
.Rows
.OfType<DataRow>()
.Select(row => row[0].ToString())));
parameters.Add("destinations", JoinAndUrlEncodeLocations(Destinations
.Rows
.OfType<DataRow>()
.Select(row => row[0].ToString())));
if(Mode != string.Empty){parameters.Add("mode", Mode);};
if(Language != string.Empty){parameters.Add("language", Language);};
if(Region != string.Empty){parameters.Add("region", Region);};
if(Avoid != string.Empty){parameters.Add("avoid", Avoid);};
if(Units != string.Empty){parameters.Add("units", Units);};
if(TrafficModel != string.Empty){parameters.Add("traffic_model", TrafficModel);};
if(TransitMode != string.Empty){parameters.Add("transit_mode", TransitMode);};
if(TransitRoutingPreference!= string.Empty){parameters.Add("transit_routing_preference", TransitRoutingPreference);};
if(ArrivalTime != string.Empty){parameters.Add("arrival_time", ArrivalTime);};
if(DepartureTime != string.Empty){parameters.Add("departure_time", DepartureTime);}
Parameters = string.Join("&", parameters.Select(x => String.Format("{0}={1}",x.Key, x.Value)));
25-01-23 06:58 AM