示例#1
0
        protected async override Task AddItems()
        {
            IEnumerable <Movie> moviesCollection = null;

            // Add the newly download data to the collection.
            switch (this.typeLoad)
            {
            case TypeLoad.FILTER_BY_TITLE:
                moviesCollection = await MoviesManager.GetMoviesManager().FilterByTitle(this.filter, this.CurrentPosition, this.PageSize);

                break;

            case TypeLoad.NO_FILTER:
            default:
                moviesCollection = await MoviesManager.GetMoviesManager().GetMovies(this.CurrentPosition, this.PageSize);

                break;
            }

            foreach (Movie m in moviesCollection)
            {
                this.MyItems.Add(m);
            }
        }
示例#2
0
 protected async override Task <bool> CheckMoreItems()
 {
     return(await MoviesManager.GetMoviesManager().CountMovies() > this.CurrentPosition);
 }