public void TickerSymbolChanged(string newCity) { this.CurrentCity = newCity; WeatherCollection newHistoryCollection = _weatherService.GetWeatherHistory(newCity); HistoryCollection = newHistoryCollection; GroupWeatherCollection newGroupCollection = _weatherService.GetWeatherBreakdown(newCity); GroupHistoryCollection = newGroupCollection; }
private GroupWeatherCollection GetCurrentGroupHistory(WeatherCollection history) { var result = new GroupWeatherCollection(); var tempQuery = from hour in history group hour by hour.Value into newGroup orderby newGroup.Key select newGroup; foreach (var g in tempQuery) { result.Add(new WeatherGroupItem { Counts = g.Count(), Temperature = g.Key }); } return(result); }
public GroupWeatherCollection GetWeatherBreakdown(string citySymbol) { GroupWeatherCollection items = _groupedHistory[citySymbol]; return(items); }