コード例 #1
0
        public MainViewModel(IWebDataProvider webDataProvider)
        {
            LoadedCities    = Tools.JsonDeserialize <List <City> >(@"DataSystem/city.list.json");
            Countries       = Tools.JsonDeserialize <ObservableCollection <CountryInfo> >(@"DataSystem/country.list.json");
            SelectedCountry = Countries.FirstOrDefault();
            Cities          = new ObservableCollection <City>(LoadedCities
                                                              .Where(x => x.Country == SelectedCountry.Alpha2Code)
                                                              .OrderBy(x => x.Name));

            SelectedCity = Cities.FirstOrDefault();
        }
コード例 #2
0
ファイル: ApiDataAccessor.cs プロジェクト: anthrax3/nRepo
 public ApiDataAccessor(IWebDataProvider webDataProvider)
 {
     this._webDataProvider = webDataProvider;
 }