public async Task FetchMoreCharactersAsync() { try { LoadingMoreCharactersInProgress = true; var houses = await _housesService.FetchHousesAsync(CurrentPage + 1); var houseCellViewModels = houses.Select(house => new HouseCellViewModel(house)); if (houseCellViewModels.Any()) { Houses.AddRange(houseCellViewModels); CurrentPage++; } else { LoadedAll = true; } } catch { // TODO - Handle exception } finally { LoadingMoreCharactersInProgress = false; } }
public virtual void CopyFrom(Person other) { Cars.Clear(); Cars.AddRange(other.Cars); Name = other.Name; Houses.Clear(); Houses.AddRange(other.Houses); Any.Clear(); Any.AddRange(other.Any); }