/// <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="Navigation"/> set. /// </summary> /// <param name="navigation">The metadata relating to navigation between pages.</param> /// <returns>A new <see cref="PagedEnumerableMetadataBuilder"/> with <see cref="Navigation"/> set.</returns> public PagedEnumerableMetadataBuilder WithNavigation(PagedEnumerableNavigation navigation) { if (navigation is null) { throw new ArgumentNullException(nameof(navigation)); } return(new PagedEnumerableMetadataBuilder(this.Count, navigation)); }
/// <summary> /// Initializes a new instance of the <see cref="PagedEnumerableMetadataBuilder"/> class. /// </summary> private PagedEnumerableMetadataBuilder() : this(PagedEnumerableCount.Default(), PagedEnumerableNavigation.Default()) { }