Skip to content

Commit

Permalink
Merge pull request #54 from marcominerva/develop
Browse files Browse the repository at this point in the history
Class rename
  • Loading branch information
marcominerva committed Feb 23, 2024
2 parents 2c30f5c + c7c75da commit 220c2e4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace OperationResults;

public class PaginatedListResult<T>
public class PaginatedList<T>
{
public IEnumerable<T>? Items { get; set; }

Expand All @@ -12,11 +12,11 @@ public class PaginatedListResult<T>

public bool HasNextPage { get; set; }

public PaginatedListResult()
public PaginatedList()
{
}

public PaginatedListResult(IEnumerable<T>? items, int totalCount, int pageIndex, int pageSize)
public PaginatedList(IEnumerable<T>? items, int totalCount, int pageIndex, int pageSize)
{
Items = items;
TotalCount = totalCount;
Expand All @@ -25,11 +25,11 @@ public PaginatedListResult(IEnumerable<T>? items, int totalCount, int pageIndex,
HasNextPage = totalCount > (pageIndex * pageSize) + (items?.Count() ?? 0);
}

public PaginatedListResult(IEnumerable<T>? items, bool hasNextPage = false) : this(items, items?.Count() ?? 0, hasNextPage)
public PaginatedList(IEnumerable<T>? items, bool hasNextPage = false) : this(items, items?.Count() ?? 0, hasNextPage)
{
}

public PaginatedListResult(IEnumerable<T>? items, int totalCount, bool hasNextPage = false)
public PaginatedList(IEnumerable<T>? items, int totalCount, bool hasNextPage = false)
{
Items = items;
TotalCount = totalCount;
Expand Down

0 comments on commit 220c2e4

Please sign in to comment.