예제 #1
0
        private static PageRule PassThroughNonNull(PageRule pageRule)
        {
            if (pageRule == null)
            {
                throw new ArgumentNullException(nameof(pageRule));
            }

            return(pageRule);
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PagedResult{TItem}"/> class.
 /// </summary>
 /// <param name="pageRule">Page rule.</param>
 /// <param name="items">Items on page.</param>
 /// <param name="totalCount">Total count of items in repository</param>
 public PagedResult(
     PageRule pageRule,
     IEnumerable <TItem> items,
     int totalCount)
     : this(
         PassThroughNonNull(pageRule).Index,
         pageRule.Size,
         items,
         totalCount)
 {
 }