Ejemplo n.º 1
0
 private static void DisplayFeedbackMessage(FlightDetailsResponse result)
 {
     if (result.Success)
     {
         Console.WriteLine(string.Format(MessageResources.FeedbackMessageSuccessConsole,
                                         result.Distance, result.EstimatedLengthInHrs, Environment.NewLine, result.NearestFlightDate.ToShortDateString(), result.FreeSeatsCount));
     }
     else
     {
         Console.WriteLine(string.Format(MessageResources.FeedbackMessageFailConsole, Environment.NewLine));
     }
 }
Ejemplo n.º 2
0
        private static FlightDetailsResponse QueryForSelectedFlight(string choice)
        {
            FlightDetailsResponse result = null;
            var flightsService           = ComponentManager.GetInstance <IFlightService>();

            switch (choice)
            {
            case "1":
                result = flightsService.GetFlightDetails("London", "Dublin");
                break;

            case "2":
                result = flightsService.GetFlightDetails("Los Angeles", "San Francisco");
                break;

            case "3":
                result = flightsService.GetFlightDetails("Melbourne", "Sydney");
                break;
            }
            return(result);
        }