Exemplo n.º 1
0
        private static async Task DoClientWork(IClusterClient client)
        {
            Console.WriteLine("Enter city name to get weather data or 'Q' to quit.");
            IWeatherService weatherService = new WeatherService(client);

            string userInput = Console.ReadLine();

            while (userInput != "Q")
            {
                (Location city, Conditions weather) = await weatherService.FindWeatherDataForCity(userInput);

                OutputWeather(city, weather);
                userInput = Console.ReadLine();
            }
        }