public WeatherDataController(IEnumerable <IWeatherData> weatherDataServices, IWeatherInputParser inputParser, MvcWeatherContext context, ISmhiApiServices smhiApiServices) { _weatherDataServices = weatherDataServices; _inputParser = inputParser; _context = context; _weatherData = _inputParser.ParseWeatherInput(); _smhiApiServices = smhiApiServices; }
public string SetDataSource(string csvPath) { try { _inputParser.SetDataSource(csvPath); _weatherData = _inputParser.ParseWeatherInput(); } catch (System.IO.FileNotFoundException) { return("Error, file not found. Enter a locally stored csv file."); } return("Success, weather data source changed to " + csvPath); }
public WeatherDataController(IEnumerable <IWeather> weatherServices, IWeatherInputParser inputParser) { _inputParser = inputParser; _weatherServices = weatherServices; _weatherData = _inputParser.ParseWeatherInput(); }