forked from smartstore/SmartStoreNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIPageable.cs
More file actions
90 lines (72 loc) · 2.05 KB
/
Copy pathIPageable.cs
File metadata and controls
90 lines (72 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using System;
using System.Runtime.Serialization;
using System.Collections;
using System.Collections.Generic;
// codehint: sm-add (new file)
namespace SmartStore.Core
{
/// <summary>
/// A collection of objects that has been split into pages.
/// </summary>
public interface IPageable : IEnumerable
{
/// <summary>
/// The 0-based current page index
/// </summary>
[DataMember]
int PageIndex { get; set; }
/// <summary>
/// The number of items in each page.
/// </summary>
[DataMember]
int PageSize { get; set; }
/// <summary>
/// The total number of items.
/// </summary>
[DataMember]
int TotalCount { get; set; }
/// <summary>
/// The 1-based current page index
/// </summary>
[DataMember]
int PageNumber { get; set; }
/// <summary>
/// The total number of pages.
/// </summary>
[DataMember]
int TotalPages { get; }
/// <summary>
/// Whether there are pages before the current page.
/// </summary>
bool HasPreviousPage { get; }
/// <summary>
/// Whether there are pages after the current page.
/// </summary>
bool HasNextPage { get; }
/// <summary>
/// The 1-based index of the first item in the page.
/// </summary>
[DataMember]
int FirstItemIndex { get; }
/// <summary>
/// The 1-based index of the last item in the page.
/// </summary>
[DataMember]
int LastItemIndex { get; }
/// <summary>
/// Whether the page is the first page
/// </summary>
bool IsFirstPage { get; }
/// <summary>
/// Whether the page is the last page
/// </summary>
bool IsLastPage { get; }
}
/// <summary>
/// Paged list interface
/// </summary>
public interface IPagedList<T> : IPageable, IList<T>
{
// codehint: sm-delete (members of IPageable now)
}
}