Candor.PagingOptions.GetItemCountForPage C# (CSharp) 메소드

GetItemCountForPage() 공개 메소드

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
리턴 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)));
        }