Пример #1
0
        // Main sub-method that is responsible for chedking and returning a flight price change result
        public string ShowUpdatedResults(Dictionary <string, Airport> airports, FlightDetails fd, out TripsSearchResponse result)
        {
            string guid = string.Empty;

            result = null;

            // Checks the current flight price for a stored flight (being followed by the user)
            string[] res = QpxExpressApiHelper.GetFlightPrices(false, airports, fd, out guid, out result).ToArray();

            // The result is formatted and returned to the interested user
            return(ProcessFlight.OutputResult(res, guid));
        }
Пример #2
0
        // Main method for processing a flight request
        public async Task <string> ProcessRequest()
        {
            return(await Task.Run(() =>
            {
                string guid = string.Empty;
                TripsSearchResponse result = null;

                string[] res = QpxExpressApiHelper.GetFlightPrices(true, Airports,
                                                                   FlightDetails, out guid, out result).ToArray();

                return OutputResult(res, guid);
            }));
        }