|
|
|
@ -74,12 +74,12 @@ namespace FLocal.IISHandler { |
|
|
|
|
new XElement("unlimited", (this.count < 1).ToPlainString()), |
|
|
|
|
new XElement("start", this.start), |
|
|
|
|
new XElement("count", this.count), |
|
|
|
|
new XElement("total", this.total), |
|
|
|
|
new XElement("total", this.total.Value), |
|
|
|
|
new XElement("perPage", this.perPage), |
|
|
|
|
new XElement("isEmpty", (this.perPage >= this.total).ToPlainString()) |
|
|
|
|
new XElement("isEmpty", (this.perPage >= this.total.Value).ToPlainString()) |
|
|
|
|
); |
|
|
|
|
if(this.count > 0) { |
|
|
|
|
if(this.start + this.count < this.total) { |
|
|
|
|
if(this.start + this.count < this.total.Value) { |
|
|
|
|
result.Add(new XElement("next", this.start + this.count)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -88,7 +88,7 @@ namespace FLocal.IISHandler { |
|
|
|
|
pages.Add(i*this.perPage); |
|
|
|
|
} |
|
|
|
|
{ |
|
|
|
|
long last = this.total - 1; |
|
|
|
|
long last = this.total.Value - 1; |
|
|
|
|
long totalFloor = last - (last % this.perPage); |
|
|
|
|
for(long i=0; i<left; i++) { |
|
|
|
|
pages.Add(totalFloor - i*this.perPage); |
|
|
|
@ -102,7 +102,7 @@ namespace FLocal.IISHandler { |
|
|
|
|
} |
|
|
|
|
pages.Add(this.start); |
|
|
|
|
result.Add(new XElement("pages", |
|
|
|
|
from page in pages where (page >= 0) && (page < this.total) orderby page select new XElement("page", page) |
|
|
|
|
from page in pages where (page >= 0) && (page < this.total.Value) orderby page select new XElement("page", page) |
|
|
|
|
)); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|