Show / Hide Table of Contents

    Class PagedCollectionExtensions

    This is an extension implementation that provides ways to enable paging on System.Collections.Generic.IEnumerable<T> sequences.

    Inheritance
    System.Object
    PagedCollectionExtensions
    Namespace: Cuemon.Collections.Generic
    Assembly: Cuemon.Core.dll
    Syntax
    public static class PagedCollectionExtensions

    Methods

    | Improve this Doc

    ToPagedCollection<T>(IEnumerable<T>)

    Converts the specified source to a paged data sequence.

    Declaration
    public static PagedCollection<T> ToPagedCollection<T>(this IEnumerable<T> source)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The source of the sequence to make pageable.

    Returns
    Type Description
    PagedCollection<T>

    An instance of PagedCollection<T>.

    Type Parameters
    Name Description
    T

    The type of the elements of source.

    Remarks

    The starting page is set to 1 and the page size is determined by DefaultPageSize.

    | Improve this Doc

    ToPagedCollection<T>(IEnumerable<T>, PagedSettings)

    Converts the specified source to a paged data sequence initialized with settings.

    Declaration
    public static PagedCollection<T> ToPagedCollection<T>(this IEnumerable<T> source, PagedSettings settings)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The source of the sequence to make pageable.

    PagedSettings settings

    The settings that specifies the conditions of the converted source.

    Returns
    Type Description
    PagedCollection<T>

    An instance of PagedCollection<T> initialized with settings.

    Type Parameters
    Name Description
    T

    The type of the elements of source.

    | Improve this Doc

    ToPagedCollection<T>(IEnumerable<T>, PagedSettings, Int32)

    Converts the specified source to a paged data sequence initialized with settings.

    Declaration
    public static PagedCollection<T> ToPagedCollection<T>(this IEnumerable<T> source, PagedSettings settings, int totalElementCount)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The source of the sequence to make pageable.

    PagedSettings settings

    The settings that specifies the conditions of the converted source.

    System.Int32 totalElementCount

    The total number of elements in the source sequence.

    Returns
    Type Description
    PagedCollection<T>

    An instance of PagedCollection<T> initialized with settings.

    Type Parameters
    Name Description
    T

    The type of the elements of source.

    | Improve this Doc

    ToPagedCollection<T>(IEnumerable<T>, Int32)

    Converts the specified source to a paged data sequence initialized with starting pageNumber.

    Declaration
    public static PagedCollection<T> ToPagedCollection<T>(this IEnumerable<T> source, int pageNumber)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The source of the sequence to make pageable.

    System.Int32 pageNumber

    The page number to start with.

    Returns
    Type Description
    PagedCollection<T>

    An instance of PagedCollection<T>.

    Type Parameters
    Name Description
    T

    The type of the elements of source.

    Remarks

    The page size is determined by DefaultPageSize.

    | Improve this Doc

    ToPagedCollection<T>(IEnumerable<T>, Int32, Int32)

    Converts the specified source to a paged data sequence initialized with starting pageNumber and pageSize.

    Declaration
    public static PagedCollection<T> ToPagedCollection<T>(this IEnumerable<T> source, int pageNumber, int pageSize)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The source of the sequence to make pageable.

    System.Int32 pageNumber

    The page number to start with.

    System.Int32 pageSize

    The number of elements a page can contain.

    Returns
    Type Description
    PagedCollection<T>

    An instance of PagedCollection<T>.

    Type Parameters
    Name Description
    T

    The type of the elements of source.

    | Improve this Doc

    ToPagedCollection<T>(IEnumerable<T>, Int32, Int32, Int32)

    Converts the specified source to a paged data sequence initialized with starting pageNumber and pageSize.

    Declaration
    public static PagedCollection<T> ToPagedCollection<T>(this IEnumerable<T> source, int pageNumber, int pageSize, int totalElementCount)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> source

    The source of the sequence to make pageable.

    System.Int32 pageNumber

    The page number to start with.

    System.Int32 pageSize

    The number of elements a page can contain.

    System.Int32 totalElementCount

    The total number of elements in the source sequence.

    Returns
    Type Description
    PagedCollection<T>

    An instance of PagedCollection<T>.

    Type Parameters
    Name Description
    T

    The type of the elements of source.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX