Candor.PagingOptions.GetItemCountForPage C# (CSharp) Method

GetItemCountForPage() public method

Gets the number of items on the current page as determined by PageIndex. This will be the lesser of TotalItemCount minus the items on the previous pages and the PageSize; but no less than zero.
public GetItemCountForPage ( ) : int
return int
        public int GetItemCountForPage()
        {
            int items = Math.Max(0, TotalItemCount);
            if (!enabled_ || PageSize > TotalItemCount)
                return items;
            else
                return Math.Max(0, Math.Min(PageSize, items - (PageIndex * PageSize)));
        }