You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
abp/framework/src/Volo.Abp.Ddd.Application.Co.../Volo/Abp/Application/Dtos/PagedResultDto.cs

65 lines
1.8 KiB

using System;
using System.Collections.Generic;
namespace Volo.Abp.Application.Dtos;
/// <summary>
/// Implements <see cref="IPagedResult{T}"/>.
/// </summary>
/// <typeparam name="T">Type of the items in the <see cref="ListResultDto{T}.Items"/> list</typeparam>
[Serializable]
public class PagedResultDto<T> : ListResultDto<T>, IPagedResult<T>
{
/// <inheritdoc />
public long TotalCount { get; set; } //TODO: Can be a long value..?
/// <summary>
/// Creates a new <see cref="PagedResultDto{T}"/> object.
/// </summary>
public PagedResultDto()
{
}
/// <summary>
/// Creates a new <see cref="PagedResultDto{T}"/> object.
/// </summary>
/// <param name="totalCount">Total count of Items</param>
/// <param name="items">List of items in current page</param>
public PagedResultDto(long totalCount, IReadOnlyList<T> items)
: base(items)
{
TotalCount = totalCount;
}
}
/// <summary>
/// Implements <see cref="IPagedResult{T}"/>.
/// </summary>
/// <typeparam name="T">Type of the items in the <see cref="ListResultDto{T}.Items"/> list</typeparam>
[Serializable]
public class ExtensiblePagedResultDto<T> : ExtensibleListResultDto<T>, IPagedResult<T>
{
/// <inheritdoc />
public long TotalCount { get; set; } //TODO: Can be a long value..?
/// <summary>
/// Creates a new <see cref="PagedResultDto{T}"/> object.
/// </summary>
public ExtensiblePagedResultDto()
{
}
/// <summary>
/// Creates a new <see cref="PagedResultDto{T}"/> object.
/// </summary>
/// <param name="totalCount">Total count of Items</param>
/// <param name="items">List of items in current page</param>
public ExtensiblePagedResultDto(long totalCount, IReadOnlyList<T> items)
: base(items)
{
TotalCount = totalCount;
}
}