Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class PagedCollection<T>

    Represents a paged collection of items of type T.

    Inheritance
    object
    PagedCollection<T>
    Implements
    IPagedCollection<T>
    IPagedCollection
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Core.Collections
    Assembly: Innovt.Core.dll
    Syntax
    public class PagedCollection<T> : IPagedCollection<T>, IPagedCollection
    Type Parameters
    Name Description
    T

    The type of items in the collection.

    Remarks

    This class implements the IPagedCollection<T> interface to represent a paged collection of items. It provides properties and methods to work with paged collections, including pagination information and navigation.

    Constructors

    | Edit this page View Source

    PagedCollection()

    Initializes a new instance of the PagedCollection<T> class with an empty collection.

    Declaration
    public PagedCollection()
    | Edit this page View Source

    PagedCollection(IEnumerable<T>)

    Initializes a new instance of the PagedCollection<T> class with the specified collection of items.

    Declaration
    public PagedCollection(IEnumerable<T> collection)
    Parameters
    Type Name Description
    IEnumerable<T> collection

    The collection of items to be paged.

    | Edit this page View Source

    PagedCollection(IEnumerable<T>, int?, int?)

    Initializes a new instance of the PagedCollection<T> class with the specified collection of items, page number, and page size.

    Declaration
    public PagedCollection(IEnumerable<T> collection, int? page = null, int? pageSize = null)
    Parameters
    Type Name Description
    IEnumerable<T> collection

    The collection of items to be paged.

    int? page

    The current page number.

    int? pageSize

    The number of items per page.

    | Edit this page View Source

    PagedCollection(IEnumerable<T>, string, int?)

    Initializes a new instance of the PagedCollection<T> class with the specified collection of items, page number, and page size.

    Declaration
    public PagedCollection(IEnumerable<T> collection, string page = null, int? pageSize = null)
    Parameters
    Type Name Description
    IEnumerable<T> collection

    The collection of items to be paged.

    string page

    The current page number as a string.

    int? pageSize

    The number of items per page.

    Properties

    | Edit this page View Source

    IsNumberPagination

    Gets a value indicating whether the page number is a valid numeric representation.

    Declaration
    public bool IsNumberPagination { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Items

    Gets or sets the collection of items in the current page.

    Declaration
    public IEnumerable<T> Items { get; set; }
    Property Value
    Type Description
    IEnumerable<T>
    | Edit this page View Source

    Page

    Gets or sets the current page number.

    Declaration
    public string Page { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    PageCount

    Gets the total number of pages in the paged collection.

    Declaration
    public int PageCount { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    PageSize

    Gets or sets the number of items per page.

    Declaration
    public int PageSize { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    TotalRecords

    Gets or sets the total number of records in the entire collection.

    Declaration
    public int TotalRecords { get; set; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    HasNext()

    Determines whether there is a next page in the paged collection.

    Declaration
    public bool HasNext()
    Returns
    Type Description
    bool

    true if there is a next page; otherwise, false.

    | Edit this page View Source

    HasPrevious()

    Determines whether there is a previous page in the paged collection.

    Declaration
    public bool HasPrevious()
    Returns
    Type Description
    bool

    true if there is a previous page; otherwise, false.

    Implements

    IPagedCollection<T>
    IPagedCollection

    Extension Methods

    Extensions.IsNull(object)
    Extensions.ToStringOrDefault(object)
    SimpleMapper.MapTo<T1>(object)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX