5 changed files
D20Tek.Common | ||
D20Tek.Common.xml | ||
D20Tek.Common.Shared/DataTypes/Collections | ||
IPagedList.cs | ||
PagedListBase.cs | ||
D20Tek.Common.Standard | ||
D20Tek.Common.Standard.xml | ||
D20Tek.Common.UnitTests/DataTypes/Collections | ||
PagedListTests.cs | ||
Add comment 123 <member name="P:D20Tek.Common.Collections.PagedListBase`1.Item(System.Int32)">
Add comment 124 <inheritdoc/>
Add comment 125 </member>
Add comment 126 Plus <member name="M:D20Tek.Common.Collections.PagedListBase`1.CalculatePreviousPage">
Add comment 127 Plus <inheritdoc/>
Add comment 128 Plus </member>
Add comment 129 Plus <member name="M:D20Tek.Common.Collections.PagedListBase`1.CalculateNextPage">
Add comment 130 Plus <inheritdoc/>
Add comment 131 Plus </member>
Add comment 126 132 <member name="M:D20Tek.Common.Collections.PagedListBase`1.GetEnumerator">
Add comment 127 133 <inheritdoc/>
Add comment 128 134 </member>
Add comment 248 254 <param name="index">Index of element to get.</param>
Add comment 249 255 <returns>Element at specified index.</returns>
Add comment 250 256 </member>
Add comment 257 Plus <member name="M:D20Tek.Common.Collections.IPagedList`1.CalculatePreviousPage">
Add comment 258 Plus <summary>
Add comment 259 Plus Calculates the value of the previous page number from the current page.
Add comment 260 Plus </summary>
Add comment 261 Plus <returns>Previous page number.</returns>
Add comment 262 Plus </member>
Add comment 263 Plus <member name="M:D20Tek.Common.Collections.IPagedList`1.CalculateNextPage">
Add comment 264 Plus <summary>
Add comment 265 Plus Calculates the value of the next page number from the current page.
Add comment 266 Plus </summary>
Add comment 267 Plus <returns>Previous page number.</returns>
Add comment 268 Plus </member>
Add comment 251 269 <member name="T:D20Tek.Common.DataTypes.Collections.VirtualPagedList`1">
Add comment 252 270 <summary>
Add comment 253 271 Class that represents a list that has been separated into different pages.
IPagedList.cs
/D20Tek.Common.Shared/DataTypes/Collections/IPagedList.cs+12/D20Tek.Common.Shared/DataTypes/Collections/IPagedList.cs
Add comment 96 /// <param name="index">Index of element to get.</param>
Add comment 97 /// <returns>Element at specified index.</returns>
Add comment 98 T this[int index] { get; }
Add comment 99 Plus
Add comment 100 Plus /// <summary>
Add comment 101 Plus /// Calculates the value of the previous page number from the current page.
Add comment 102 Plus /// </summary>
Add comment 103 Plus /// <returns>Previous page number.</returns>
Add comment 104 Plus int CalculatePreviousPage();
Add comment 105 Plus
Add comment 106 Plus /// <summary>
Add comment 107 Plus /// Calculates the value of the next page number from the current page.
Add comment 108 Plus /// </summary>
Add comment 109 Plus /// <returns>Previous page number.</returns>
Add comment 110 Plus int CalculateNextPage();
Add comment 99 111 }
Add comment 100 112 }
Add comment 101 113
PagedListBase.cs
/D20Tek.Common.Shared/DataTypes/Collections/PagedListBase.cs+14/D20Tek.Common.Shared/DataTypes/Collections/PagedListBase.cs
Add comment 21 /// <typeparam name="T">Type of element in the list.</typeparam>
Add comment 22 public abstract class PagedListBase<T> : IPagedList<T>
Add comment 23 {
Add comment 24 Plus private const int DefaultStartingPage = 1;
Add comment 25 Plus
Add comment 24 26 /// <summary>
Add comment 25 27 /// Initializes a new instance of the <see cref="PagedListBase{T}"/> class.
Add comment 26 28 /// </summary>
Add comment 159 161 public T this[int index] => this.PagedView[index];
Add comment 160 162
Add comment 161 163 /// <inheritdoc/>
Add comment 164 Plus public int CalculatePreviousPage()
Add comment 165 Plus {
Add comment 166 Plus return Math.Max(this.PageNumber - 1, DefaultStartingPage);
Add comment 167 Plus }
Add comment 168 Plus
Add comment 169 Plus /// <inheritdoc/>
Add comment 170 Plus public int CalculateNextPage()
Add comment 171 Plus {
Add comment 172 Plus return Math.Min(this.PageNumber + 1, this.PageCount);
Add comment 173 Plus }
Add comment 174 Plus
Add comment 175 Plus /// <inheritdoc/>
Add comment 162 176 public IEnumerator<T> GetEnumerator()
Add comment 163 177 {
Add comment 164 178 return this.PagedView.GetEnumerator();
D20Tek.Common.Standard.xml
/D20Tek.Common.Standard/D20Tek.Common.Standard.xml/D20Tek.Common.Standard/D20Tek.Common.Standard.xml
PagedListTests.cs
/D20Tek.Common.UnitTests/DataTypes/Collections/PagedListTests.cs/D20Tek.Common.UnitTests/DataTypes/Collections/PagedListTests.cs