aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Models/Page.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-09 18:53:52 +0800
committercrupest <crupest@outlook.com>2022-04-09 18:53:52 +0800
commit0aa43ef4c6724f672453676a0c688cd80097dad7 (patch)
tree5bbb0d736b385b9d0c6254f7e006161e0080de8f /BackEnd/Timeline/Models/Page.cs
parent4db131899145b7aca0ea5fd36984cf1542c9619b (diff)
downloadtimeline-0aa43ef4c6724f672453676a0c688cd80097dad7.tar.gz
timeline-0aa43ef4c6724f672453676a0c688cd80097dad7.tar.bz2
timeline-0aa43ef4c6724f672453676a0c688cd80097dad7.zip
...
Diffstat (limited to 'BackEnd/Timeline/Models/Page.cs')
-rw-r--r--BackEnd/Timeline/Models/Page.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Models/Page.cs b/BackEnd/Timeline/Models/Page.cs
index 807702c1..c0d8d472 100644
--- a/BackEnd/Timeline/Models/Page.cs
+++ b/BackEnd/Timeline/Models/Page.cs
@@ -23,6 +23,11 @@ namespace Timeline.Models
public long TotalPageCount { get; set; }
public long TotalCount { get; set; }
public List<T> Items { get; set; } = new List<T>();
+
+ public Page<U> WithItems<U>(List<U> items)
+ {
+ return new Page<U>(PageNumber, PageSize, TotalCount, items);
+ }
}
}