Class TruncatedCollection<T>
Represents a class that truncates a collection to a given page size.
public class TruncatedCollection<T> : List<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, ITruncatedCollection, IEnumerable<T>, IEnumerable
Type Parameters
T
The collection element type.
- Inheritance
-
List<T>TruncatedCollection<T>
- Implements
-
IList<T>ICollection<T>IEnumerable<T>
- Inherited Members
Constructors
TruncatedCollection(IEnumerable<T>, int)
Initializes a new instance of the TruncatedCollection<T> class.
public TruncatedCollection(IEnumerable<T> source, int pageSize)
Parameters
source
IEnumerable<T>The collection to be truncated.
pageSize
intThe page size.
TruncatedCollection(IQueryable<T>, int)
Initializes a new instance of the TruncatedCollection<T> class.
public TruncatedCollection(IQueryable<T> source, int pageSize)
Parameters
source
IQueryable<T>The queryable collection to be truncated.
pageSize
intThe page size.
Properties
IsTruncated
public bool IsTruncated { get; }
Property Value
PageSize
public int PageSize { get; }