private void ProcessData() { var dataProcessor = new Processor(_inputData); _citiesByPopulationData = dataProcessor.CitiesByPopulation; _interstatesByCityData = dataProcessor.InterstatesByCity; }
private void ConvertToInterstateByCities() { _interstatesByCity = new InterstatesByCity(); var interstates = GetAllInterstates(); foreach (var interstate in interstates.OrderByDescending(i => i)) { _interstatesByCity.Items.Add(new InterstatesByCityItem { Interstate = string.Format("I-{0}", interstate), NumberOfCities = _inputData.Count(c => c.Interstates.Contains(interstate)) }); } }