Skip to content

Commit

Permalink
feat: ajustes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonveroneze committed Dec 25, 2024
1 parent 6512285 commit 015c948
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace JacksonVeroneze.NET.Pagination.Cursor.Extensions;

public static class PageExtension
{
public static Page<TType> ToPage<TType>(
this ICollection<TType> source,
bool hasMore,
string? cursor)
where TType : class
{
ArgumentNullException.ThrowIfNull(source);

PageInfo pageInfo = new(hasMore, cursor);

return new Page<TType>(source, pageInfo);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PackageDescription>JacksonVeroneze.NET.Pagination</PackageDescription>
<RepositoryUrl>https://github.com/jacksonveroneze/JacksonVeroneze.NET.Pagination</RepositoryUrl>
<Title>JacksonVeroneze.NET.Pagination</Title>
<Description>Pacote utilizado para commons do EF.</Description>
<Description>Pacote utilizado para paginação.</Description>
<PackageProjectUrl>JacksonVeroneze.NET.Pagination</PackageProjectUrl>
<PackageLicenseUrl>JacksonVeroneze.NET.Pagination/blob/main/LICENSE</PackageLicenseUrl>
<Copyright>Jackson Veroneze</Copyright>
Expand Down

0 comments on commit 015c948

Please sign in to comment.