/// <summary> /// Initializes a new instance of the <see cref="PagedEnumerableMetadataBuilder"/> class /// using the given <paramref name="navigation"/>. /// </summary> /// <param name="navigation">The navigation object to use.</param> /// <param name="count">The count object to use.</param> private PagedEnumerableMetadataBuilder( PagedEnumerableCount count, PagedEnumerableNavigation navigation) { this.Count = count; this.Navigation = navigation; }
/// <summary> /// Creates a new <see cref="PagedEnumerableMetadataBuilder"/> with <see cref="Count"/> set. /// </summary> /// <param name="count">The metadata related to counts of pages.</param> /// <returns>A new <see cref="PagedEnumerableMetadataBuilder"/> with <see cref="Count"/> set.</returns> public PagedEnumerableMetadataBuilder WithCount(PagedEnumerableCount count) { if (count is null) { throw new ArgumentNullException(nameof(count)); } return(new PagedEnumerableMetadataBuilder(count, this.Navigation)); }
/// <summary> /// Initializes a new instance of the <see cref="PagedEnumerableMetadataBuilder"/> class. /// </summary> private PagedEnumerableMetadataBuilder() : this(PagedEnumerableCount.Default(), PagedEnumerableNavigation.Default()) { }