DD.WellWorkover.Cloud/AsbCloudApp/Data/PaginationContainer.cs
2022-06-02 12:35:51 +05:00

49 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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