public PageList(IList <T> list, PagerObject pager) { this.total = list.Count; for (int i = pager.startIndex; (i < this.total) && (i < pager.endIndex); i++) { this.AddLast(list.ElementAt <T>(i)); } }
public static ICriteria CreateCriteria <T>(PagerObject pager) { ICriteria icr = CreateCriteria <T>(); icr.SetFirstResult(pager.startIndex); icr.SetMaxResults(pager.size); return(icr); }