Skip to main content

PagedResult<T>

Namespace: Meshmakers.Octo.Communication.Contracts.DataTransferObjects

Represents a result set that is paged.

public class PagedResult<T>

Type Parameters

T

Inheritance ObjectPagedResult<T>

Properties

TotalCount

Returns the total count of items available

public long TotalCount { get; }

Property Value

Int64

Skip

Returns the amount of items skipped

public Nullable<int> Skip { get; }

Property Value

Nullable<Int32>

Take

Returns the amount of items taken

public Nullable<int> Take { get; }

Property Value

Nullable<Int32>

List

Returns the paged result set

public ICollection<T> List { get; }

Property Value

ICollection<T>

Constructors

PagedResult(IEnumerable<T>, Nullable<Int32>, Nullable<Int32>, Int64)

Constructor

public PagedResult(IEnumerable<T> source, Nullable<int> skip, Nullable<int> take, long totalCount)

Parameters

source IEnumerable<T>
The source of data as list

skip Nullable<Int32>
Amount of items skipped

take Nullable<Int32>
Amount of items taken

totalCount Int64
Total count of items based on query

PagedResult(IEnumerable<T>)

Constructor

public PagedResult(IEnumerable<T> source)

Parameters

source IEnumerable<T>
The source of data as list

Methods

GetHeader()

Creates a paging header

public PagingHeader GetHeader()

Returns

PagingHeader