예제 #1
0
 private void InitializeSortedCountries()
 {
     _sortedCountries = Substitute.For <ISortedCountries>();
     _countries       = new List <string> {
         "IT", "CH", "SE", "IS", "US", "FR"
     };
     _sortedCountries.List().Returns(_countries);
 }
예제 #2
0
        private ObservableCollection <IServerListItem> CreateCountryList()
        {
            List <string> countries = _sortedCountries.List();
            User          user      = _userStorage.User();
            ObservableCollection <IServerListItem> list = new ObservableCollection <IServerListItem>();

            foreach (string country in countries)
            {
                string name = Countries.GetName(country);
                if (string.IsNullOrEmpty(name))
                {
                    continue;
                }

                list.Add(new ServersByCountryViewModel(country, user.MaxTier, _serverManager, _vpnState));
            }

            return(list);
        }