public static void Run()
        {
            string zipCode = "35080";

            GeoLookUpService geoLookUpService = new GeoLookUpService();
            var city   = geoLookUpService.GetCityForZipCode(zipCode);
            var state  = geoLookUpService.GetStateForZipCode(zipCode);
            var coords = geoLookUpService.GetCoordinatesForZipCode(zipCode);

            WeatherService weatherService = new WeatherService();
            var            farenheit      = weatherService.GetTempFarenheight(coords.Latitude, coords.Longitude);
            var            converter      = new EnglishMetricConverter();
            var            celcius        = converter.FarenheitToCelcius(farenheit);

            Console.WriteLine($"The current temperature is {farenheit}F /{celcius}C in {city}, {state}");
        }
Пример #2
0
 public TemperatureLookUpFacade(GeoLookUpService geoLookUpService, WeatherService weatherService, EnglishMetricConverter converter)
 {
     _geoLookUpService = geoLookUpService;
     _weatherService   = weatherService;
     _converter        = converter;
 }