using System; using System.Collections.Generic; namespace CleanArchitecture.Application.ViewModels; public sealed class PagedResult { public int Count { get; init; } public IList Items { get; init; } = Array.Empty(); public int Page { get; init; } public int PageSize { get; init; } public PagedResult(int count, IList items, int page, int pageSize) { Count = count; Items = items; Page = page; PageSize = pageSize; } // used by json deserializer private PagedResult() { } public static PagedResult Empty() { return new PagedResult { Count = 0, Items = Array.Empty(), Page = 1, PageSize = 10 }; } }