public bool MoveNext() { if ((PageSize <= 0 || CurrentItemIndex >= MaxNumItems) && CurrentPage > 0) { return(false); } if (currentPage == null || CurrentPageItemIndex >= PageSize) { currentPage = GetNext(new PagerInfo { CurrentPage = ++CurrentPage, PageSize = PageSize }); CurrentPageItemIndex = 0; } if (currentPage == null) { return(false); } //if (currentPage.TotalItems > 0) if (currentPage.HasMore) { currentItem = currentPage.ElementAt(CurrentPageItemIndex++); ++CurrentItemIndex; return(true); } return(false); }