private void ProcessData()
        {
            var dataProcessor = new Processor(_inputData);

            _citiesByPopulationData = dataProcessor.CitiesByPopulation;
            _interstatesByCityData  = dataProcessor.InterstatesByCity;
        }
Exemple #2
0
 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))
         });
     }
 }
Exemple #3
0
        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))
                });
            }
        }
 private void ProcessData()
 {
     var dataProcessor = new Processor(_inputData);
     _citiesByPopulationData = dataProcessor.CitiesByPopulation;
     _interstatesByCityData = dataProcessor.InterstatesByCity;
 }