Class PaginationList<T>
- Namespace
- Cuemon.Collections.Generic
- Assembly
- Cuemon.Core.dll
Represents an eagerly materialized generic and read-only pagination list.
public class PaginationList<T> : PaginationEnumerable<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
T
The type of elements in the collection.
- Inheritance
-
PaginationList<T>
- Implements
-
IEnumerable<T>
- Inherited Members
Constructors
PaginationList(IEnumerable<T>, Func<Int32>, Action<PaginationOptions>)
Initializes a new instance of the PaginationList<T> class.
public PaginationList(IEnumerable<T> source, Func<int> totalElementCounter, Action<PaginationOptions> setup = null)
Parameters
source
IEnumerable<T>The sequence to turn into a page.
totalElementCounter
Func<Int32>The total element counter.
setup
Action<PaginationOptions>The PaginationOptions which may be configured.
Properties
Count
Gets the number of elements on the current page.
public int Count { get; }
Property Value
- Int32
The number of elements on the current page.
Item[Int32]
Gets the element at the specified index.
public T this[int index] { get; }
Parameters
index
Int32The zero-based index of the element to get.
Property Value
- T
The element at the specified index.