Say I have the following interface for exposing a paged list
public interface IPagedList
{
IEnumerable PageResults { get; }
int Current
Define two interfaces, first
public interface IPageSpecification
{
int CurrentPageIndex { get; }
int TotalRecordCount { get; }
int TotalPageCount { get; }
int PageSize { get; }
}
public interface IPagedList : IPageSpecification
{
IEnumerable PageResults { get; }
}
As you see, IPagedList is derived from IPageSpecification. In your method, only use IPageSpecification as parameter. In other cases, IPagedList - implementers of IPagedList would also contain data from IPageSpecification