Esempio n. 1
0
        private void SaveHouses(Task <IEnumerable <HouseDTO> > newHouses)
        {
            var houses = newHouses.Result;

            Houses = houses.OrderBy(x => x.ComplexNumber, new NaturalStringComparer()).ToArray();
            _logger.Info($"Домов загружено : { Houses.Length }");
            HousesLoaded?.Invoke();
        }
Esempio n. 2
0
        void SaveHouses(Task <List <OsmHouse> > newHouses)
        {
            var houses = newHouses.Result;

            //Удаляем литеры А у домов где других литер нет.
            foreach (var house in houses.Where(x => x.Letter == "А" || x.Letter == "а" || x.Letter == "A" || x.Letter == "a"))
            {
                if (!houses.Any(x => x.HouseNumber == house.HouseNumber && x.Letter != house.Letter))
                {
                    house.Letter = String.Empty;
                }
            }
            houses = houses.OrderBy(x => x.ComplexNumber, new NaturalStringComparer()).ToList();
            Houses = houses.ToArray();
            logger.Info($"Домов загружено : {Houses.Length}");
            HousesLoaded?.Invoke();
        }