Example #1
0
 private Location[] GetLocations(Leg leg, Dictionary <int, string> placesNames)
 {
     return(new[] { leg.OriginStation, leg.DestinationStation }.Select(loc => placesNames[loc])
            .Select(loc => loc.Split(' ').First())
            .Select(loc => locationHandler.GetLocationByName(loc)).ToArray());
 }
Example #2
0
 private Money GetMoney(Leg leg, Dictionary <string, decimal> prices, SkyscannerResponse response)
 {
     return(new Money(Currencies.GetCurrency((string)response.Query["Currency"]),
                      prices[leg.Id]));
 }
Example #3
0
 private DateTime[] GetDates(Leg leg)
 {
     return(new[] { leg.Departure, leg.Arrival }.Select(DateTime.Parse).ToArray());
 }