2021-04-30 17:35:35 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-04-23 10:21:25 +05:00
|
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Data
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Контейнер для поддержки постраничного просмотра таблиц
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="T"></typeparam>
|
|
|
|
|
public class PaginationContainer<T>
|
|
|
|
|
{
|
|
|
|
|
public PaginationContainer()
|
|
|
|
|
{
|
|
|
|
|
Items = new List<T>(4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public PaginationContainer(int capacity)
|
|
|
|
|
{
|
|
|
|
|
Items = new List<T>(capacity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Кол-во записей пропущеных с начала таблицы в запросе от api
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Skip { get; set; }
|
2021-04-30 17:35:35 +05:00
|
|
|
|
|
2021-04-23 10:21:25 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Кол-во записей в запросе от api
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Take { get; set; }
|
2021-04-30 17:35:35 +05:00
|
|
|
|
|
2021-04-23 10:21:25 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Кол-во записей всего в таблице
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int Count { get; set; }
|
2021-04-30 17:35:35 +05:00
|
|
|
|
|
2021-04-23 10:21:25 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Данные
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<T> Items { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|