示例#1
0
        public void SetMockData(IGeolocationService geolocation)
        {
            Locations.Clear();
            void addLocation(string location)
            {
                App.InvokeOnMainThreadAsync(() =>
                                            Locations.Add(new Location(location, Locations.Count + 1, geolocation.GetAddressList(location).FirstOrDefault()))
                                            );
            }

            addLocation("Warszawa");
            addLocation("Wrocław");
            addLocation("Bydgoszcz");
            addLocation("Białystok");
            addLocation("Rzeszów");
            addLocation("Gdańsk");
            addLocation("Poznań");
            addLocation("Kraków");
            addLocation("Szczecin");
            addLocation("Lublin");
            addLocation("Katowice");
            addLocation("Łódź");
            addLocation("Koszalin");
            addLocation("Częstochowa");
            addLocation("Radom");
            addLocation("Płock");
            addLocation("Zamość");
            addLocation("Chojnice");
            addLocation("Świnoujście");
            addLocation("Słupsk");
            addLocation("Opole");
            addLocation("Zielona Góra");
            addLocation("Olsztyn");
        }