public MainViewModel() { _weatherConnection = new OpenWeatherConnection(); if (_weatherConnection.City == null) { _weatherConnection.City = "New York"; } WeatherData = _weatherConnection.GetWeatherData(); ForecastPartialViewModel = new ForecastPartialViewModel(_weatherConnection.GetDateWeatherData(), () => { OnPropertyChanged("ForecastPartialViewModel"); }); OnPropertyChanged(""); timerConfiguration(); }
public WeatherEngine(IWeatherConnection weatherConnection, IMapper mapper, ICityRepository cityRepository) { this._cityRepository = cityRepository; this._weatherConnection = weatherConnection; _mapper = mapper; }