Say I have the following interface for exposing a paged list
public interface IPagedList
{
IEnumerable PageResults { get; }
int Current
One option is to create 2 interfaces such that:
public interface IPagedListDetails
{
int CurrentPageIndex { get; }
int TotalRecordCount { get; }
int TotalPageCount { get; }
int PageSize { get; }
}
public interface IPagedList : IPagedListDetails
{
IEnumerable PageResults { get; }
}
And then your control:
public class PagedListPager(IPagedListDetails details)