public async Task <TripSearchResult> SearchForTrips(string startLocation, string endLocation, double maxWalkMeters, DateTime date, bool isDeparture, String cityString, String stateString) { TripSearch criteria = new TripSearch(); criteria.MaxWalkMeters = maxWalkMeters; criteria.NeedWheelchairAccess = false; criteria.SearchByArriveByTime = !isDeparture; criteria.Time = date; criteria = parseLocationString(criteria, startLocation, true, cityString, stateString); criteria = parseLocationString(criteria, endLocation, false, cityString, stateString); TripSearchResult searchResult = await mTripManager.SearchForTrip(criteria); if (searchResult != null) { searchResult.searchCriteria = criteria; searchResult.itineraries.Sort((a, b) => a.startTime.CompareTo(b.startTime)); } return(searchResult); }