Show / Hide Table of Contents

    Class PagedCollection<T>

    Represents an System.Collections.Generic.IEnumerable<T> paged data sequence.

    Inheritance
    System.Object
    PagedCollection
    PagedCollection<T>
    Implements
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Inherited Members
    PagedCollection.Search<T>(IEnumerable<T>, Func<T, PagedSettings, StringComparison, Boolean>, PagedSettings)
    PagedCollection.Search<T>(IEnumerable<T>, Func<T, PagedSettings, StringComparison, Boolean>, PagedSettings, StringComparison)
    PagedCollection.Sort<T>(IEnumerable<T>, Func<IEnumerable<T>, PagedSettings, IEnumerable<T>>, PagedSettings)
    Namespace: Cuemon.Collections.Generic
    Assembly: Cuemon.Core.dll
    Syntax
    public class PagedCollection<T> : PagedCollection, IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    The type of the elements of this instance.

    Constructors

    | Improve this Doc

    PagedCollection(IEnumerable<T>)

    Initializes a new instance of the PagedCollection<T> class.

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

    The source of the sequence.

    Remarks

    This will do a System.Linq.Enumerable.Count<TSource>(IEnumerable<TSource>) on source; so if your source is fragile consider providing this information in the overloaded constructor.

    | Improve this Doc

    PagedCollection(IEnumerable<T>, PagedSettings)

    Initializes a new instance of the PagedCollection<T> class.

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

    The source of the sequence.

    PagedSettings settings

    The PagedSettings that will be applied to this instance.

    | Improve this Doc

    PagedCollection(IEnumerable<T>, PagedSettings, Int32)

    Initializes a new instance of the PagedCollection<T> class.

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

    The source of the sequence.

    PagedSettings settings

    The PagedSettings that will be applied to this instance.

    System.Int32 totalElementCount

    The total number of elements in the source sequence.

    | Improve this Doc

    PagedCollection(Func<PagedSettings, IEnumerable<T>>, PagedSettings, Func<PagedSettings, Int32>)

    Initializes a new instance of the PagedCollection<T> class.

    Declaration
    public PagedCollection(Func<PagedSettings, IEnumerable<T>> selector, PagedSettings settings, Func<PagedSettings, int> counter)
    Parameters
    Type Name Description
    System.Func<PagedSettings, System.Collections.Generic.IEnumerable<T>> selector

    The function delegate that will define the System.Collections.Generic.IEnumerable<T> source sequence of this instance.

    PagedSettings settings

    The PagedSettings that will be applied to this instance.

    System.Func<PagedSettings, System.Int32> counter

    The function delegate that will define the TotalElementCount of this instance.

    Properties

    | Improve this Doc

    Count

    Gets the number of elements on the current page.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    The number of elements on the current page.

    | Improve this Doc

    FirstPage

    Gets a value indicating whether this instance is on the first paged data sequence.

    Declaration
    public bool FirstPage { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is on the first paged data sequence; otherwise, false.

    | Improve this Doc

    HasNextPage

    Gets a value indicating whether this instance has a next paged data sequence.

    Declaration
    public bool HasNextPage { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has a next paged data sequence; otherwise, false.

    | Improve this Doc

    HasPreviousPage

    Gets a value indicating whether this instance has a previous paged data sequence.

    Declaration
    public bool HasPreviousPage { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has a previous paged data sequence; otherwise, false.

    | Improve this Doc

    Item[Int32]

    Gets the element at the specified index.

    Declaration
    public T this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element to get.

    Property Value
    Type Description
    T

    The element at the specified index.

    | Improve this Doc

    LastPage

    Gets a value indicating whether this instance is on the last paged data sequence.

    Declaration
    public bool LastPage { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is on the last paged data sequence; otherwise, false.

    | Improve this Doc

    PageCount

    Gets the total amount of pages for the elements in this sequence.

    Declaration
    public int PageCount { get; }
    Property Value
    Type Description
    System.Int32

    The total amount of pages for the elements in this sequence.

    | Improve this Doc

    Settings

    Gets the settings that specifies the paging features of this instance.

    Declaration
    public PagedSettings Settings { get; }
    Property Value
    Type Description
    PagedSettings

    The settings that specifies the paging features of this instance.

    | Improve this Doc

    TotalElementCount

    Gets the total number of elements in the sequence before paging is applied.

    Declaration
    public int TotalElementCount { get; }
    Property Value
    Type Description
    System.Int32

    The total number of elements in the sequence before paging is applied.

    Methods

    | Improve this Doc

    GetEndOfNextPageRange(Int32)

    Gets the last number of the next page range relative to the specified page.

    Declaration
    public int GetEndOfNextPageRange(int page)
    Parameters
    Type Name Description
    System.Int32 page

    The page to calculate the last number of the next page range.

    Returns
    Type Description
    System.Int32

    An System.Int32 that represents the last number of the next page range.

    | Improve this Doc

    GetEnumerator()

    Returns an enumerator that iterates through the paged collection.

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<T>

    A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the paged collection.

    | Improve this Doc

    GetStartOfNextPageRange(Int32)

    Gets the first number of the next page range relative to the specified page.

    Declaration
    public int GetStartOfNextPageRange(int page)
    Parameters
    Type Name Description
    System.Int32 page

    The page to calculate the first number of the next page range.

    Returns
    Type Description
    System.Int32

    An System.Int32 that represents the first number of the next page range.

    | Improve this Doc

    ToString()

    Returns a System.String that represents this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents this instance.

    Overrides
    System.Object.ToString()

    Explicit Interface Implementations

    | Improve this Doc

    IEnumerable.GetEnumerator()

    Returns an enumerator that iterates through a paged collection.

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    An System.Collections.IEnumerator object that can be used to iterate through the paged collection.

    Implements

    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Extension Methods

    ConverterExtensions.ParseWith<TSource, TResult>(TSource, Func<TSource, TResult>)
    ConverterExtensions.ParseWith<TSource, T, TResult>(TSource, Func<TSource, T, TResult>, T)
    ConverterExtensions.ParseWith<TSource, T1, T2, TResult>(TSource, Func<TSource, T1, T2, TResult>, T1, T2)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, TResult>(TSource, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, TResult>(TSource, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
    ConverterExtensions.ParseWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(TSource, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    ConverterExtensions.As<TResult>(Object)
    ConverterExtensions.As<TResult>(Object, TResult)
    ConverterExtensions.As<TResult>(Object, TResult, IFormatProvider)
    DelegateUtilityExtensions.Wrap<TResult>(TResult)
    DelegateUtilityExtensions.DynamicWrap<TResult>(TResult)
    StringConverterExtensions.ToDelimitedString<TSource>(IEnumerable<TSource>)
    StringConverterExtensions.ToDelimitedString<TSource>(IEnumerable<TSource>, String)
    StringConverterExtensions.ToDelimitedString<TSource>(IEnumerable<TSource>, String, Func<TSource, String>)
    StringConverterExtensions.ToDelimitedString<TSource, T>(IEnumerable<TSource>, String, Func<TSource, T, String>, T)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2>(IEnumerable<TSource>, String, Func<TSource, T1, T2, String>, T1, T2)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2, T3>(IEnumerable<TSource>, String, Func<TSource, T1, T2, T3, String>, T1, T2, T3)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, String, Func<TSource, T1, T2, T3, T4, String>, T1, T2, T3, T4)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, String, Func<TSource, T1, T2, T3, T4, T5, String>, T1, T2, T3, T4, T5)
    StringConverterExtensions.ToDelimitedString<TSource>(IEnumerable<TSource>, String, String)
    StringConverterExtensions.ToDelimitedString<TSource>(IEnumerable<TSource>, String, String, Func<TSource, String>)
    StringConverterExtensions.ToDelimitedString<TSource, T>(IEnumerable<TSource>, String, String, Func<TSource, T, String>, T)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2>(IEnumerable<TSource>, String, String, Func<TSource, T1, T2, String>, T1, T2)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2, T3>(IEnumerable<TSource>, String, String, Func<TSource, T1, T2, T3, String>, T1, T2, T3)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, String, String, Func<TSource, T1, T2, T3, T4, String>, T1, T2, T3, T4)
    StringConverterExtensions.ToDelimitedString<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, String, String, Func<TSource, T1, T2, T3, T4, T5, String>, T1, T2, T3, T4, T5)
    TweakerExtensions.Adjust<T>(T, Func<T, T>)
    TypeUtilityExtensions.Is<T>(Object)
    TypeUtilityExtensions.IsNot<T>(Object)
    TypeUtilityExtensions.IsNullable<T>(T)
    WrapperExtensions.UseWrapper<T>(T, Action<IDictionary<String, Object>>)
    WrapperExtensions.UseWrapper<T>(T, MemberInfo, Action<IDictionary<String, Object>>)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, TResult>(IEnumerable<TSource>, Func<TSource, TResult>)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T, TResult>(IEnumerable<TSource>, Func<TSource, T, TResult>, T)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, TResult>, T1, T2)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, T3, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, TResult>, T1, T2, T3)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, T3, T4, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, TResult>, T1, T2, T3, T4)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, T3, T4, T5, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, TResult>, T1, T2, T3, T4, T5)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, T3, T4, T5, T6, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, TResult>, T1, T2, T3, T4, T5, T6)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, TResult>, T1, T2, T3, T4, T5, T6, T7)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, TResult>, T1, T2, T3, T4, T5, T6, T7, T8)
    EnumerableConverterExtensions.ParseSequenceWith<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    EnumerableExtensions.Shuffle<T>(IEnumerable<T>)
    EnumerableExtensions.Shuffle<T>(IEnumerable<T>, Func<Int32, Int32, Int32>)
    EnumerableUtilityExtensions.RandomOrDefault<TSource>(IEnumerable<TSource>)
    EnumerableUtilityExtensions.RandomOrDefault<TSource>(IEnumerable<TSource>, Func<IEnumerable<TSource>, TSource>)
    EnumerableUtilityExtensions.SelectOne<TSource>(IEnumerable<TSource>, Func<IEnumerable<TSource>, TSource>)
    EnumerableUtilityExtensions.SelectOne<TSource, T>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T, TSource>, T)
    EnumerableUtilityExtensions.SelectOne<TSource, T1, T2>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T1, T2, TSource>, T1, T2)
    EnumerableUtilityExtensions.SelectOne<TSource, T1, T2, T3>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T1, T2, T3, TSource>, T1, T2, T3)
    EnumerableUtilityExtensions.SelectOne<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, Func<IEnumerable<TSource>, T1, T2, T3, T4, TSource>, T1, T2, T3, T4)
    EnumerableUtilityExtensions.FindAll<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>)
    EnumerableUtilityExtensions.FindAll<TSource, T>(IEnumerable<TSource>, Func<TSource, T, Boolean>, T)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2>(IEnumerable<TSource>, Func<TSource, T1, T2, Boolean>, T1, T2)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2, T3>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, Boolean>, T1, T2, T3)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2, T3, T4>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, Boolean>, T1, T2, T3, T4)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2, T3, T4, T5>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, Boolean>, T1, T2, T3, T4, T5)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2, T3, T4, T5, T6>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, Boolean>, T1, T2, T3, T4, T5, T6)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2, T3, T4, T5, T6, T7>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, Boolean>, T1, T2, T3, T4, T5, T6, T7)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2, T3, T4, T5, T6, T7, T8>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, Boolean>, T1, T2, T3, T4, T5, T6, T7, T8)
    EnumerableUtilityExtensions.FindAll<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9>(IEnumerable<TSource>, Func<TSource, T1, T2, T3, T4, T5, T6, T7, T8, T9, Boolean>, T1, T2, T3, T4, T5, T6, T7, T8, T9)
    EnumerableUtilityExtensions.Contains<TSource>(IEnumerable<TSource>, TSource, Func<TSource, TSource, Boolean>)
    EnumerableUtilityExtensions.Yield<TSource>(TSource)
    PagedCollectionExtensions.ToPagedCollection<T>(IEnumerable<T>)
    PagedCollectionExtensions.ToPagedCollection<T>(IEnumerable<T>, Int32)
    PagedCollectionExtensions.ToPagedCollection<T>(IEnumerable<T>, Int32, Int32)
    PagedCollectionExtensions.ToPagedCollection<T>(IEnumerable<T>, PagedSettings)
    PagedCollectionExtensions.ToPagedCollection<T>(IEnumerable<T>, Int32, Int32, Int32)
    PagedCollectionExtensions.ToPagedCollection<T>(IEnumerable<T>, PagedSettings, Int32)
    PartitionCollectionExtensions.ToPartitionCollection<T>(IEnumerable<T>)
    PartitionCollectionExtensions.ToPartitionCollection<T>(IEnumerable<T>, Int32)
    HashUtilityExtensions.ComputeHash(Object, Action<HashOptions>)
    HmacUtilityExtensions.ComputeKeyedHash(Object, Byte[], Action<KeyedHashOptions>)
    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX