Skip to content

Commit 6a7ca61

Browse files
authored
Merge pull request #305 from adschmu/work/comments
Improve docstring formatting
2 parents 0e4bdac + d9d0d1f commit 6a7ca61

6 files changed

+177
-177
lines changed

src/X.PagedList.Mvc.Core/GoToFormRenderOptions.cs

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
namespace X.PagedList.Mvc.Core;
22

3-
///<summary>
3+
/// <summary>
44
/// Options for configuring the output of <see cref = "HtmlHelper" />.
5-
///</summary>
5+
/// </summary>
66
public class GoToFormRenderOptions
77
{
8-
///<summary>
8+
/// <summary>
99
/// The default settings, with configurable querystring key (input field name).
10-
///</summary>
10+
/// </summary>
1111
public GoToFormRenderOptions(string inputFieldName)
1212
{
1313
LabelFormat = "Go to page:";
@@ -16,48 +16,48 @@ public GoToFormRenderOptions(string inputFieldName)
1616
InputFieldType = "number";
1717
}
1818

19-
///<summary>
19+
/// <summary>
2020
/// The default settings.
21-
///</summary>
21+
/// </summary>
2222
public GoToFormRenderOptions() : this("page")
2323
{
2424
}
2525

26-
///<summary>
26+
/// <summary>
2727
/// The text to show in the form's input label.
28-
///</summary>
29-
///<example>
28+
/// </summary>
29+
/// <example>
3030
/// "Go to page:"
31-
///</example>
31+
/// </example>
3232
public string LabelFormat { get; set; }
3333

34-
///<summary>
34+
/// <summary>
3535
/// The text to show in the form's submit button.
36-
///</summary>
37-
///<example>
36+
/// </summary>
37+
/// <example>
3838
/// "Go"
39-
///</example>
39+
/// </example>
4040
public string SubmitButtonFormat { get; set; }
4141

4242
/// <summary>
4343
/// Submit button width in px
4444
/// </summary>
4545
public int SubmitButtonWidth { get; set; }
4646

47-
///<summary>
47+
/// <summary>
4848
/// The querystring key this form should submit the new page number as.
49-
///</summary>
50-
///<example>
49+
/// </summary>
50+
/// <example>
5151
/// "page"
52-
///</example>
52+
/// </example>
5353
public string InputFieldName { get; set; }
5454

55-
///<summary>
55+
/// <summary>
5656
/// The HTML input type for this field. Defaults to the HTML5 "number" type, but can be changed to "text" if targetting previous versions of HTML.
57-
///</summary>
58-
///<example>
57+
/// </summary>
58+
/// <example>
5959
/// "number"
60-
///</example>
60+
/// </example>
6161
public string InputFieldType { get; set; }
6262

6363
/// <summary>

src/X.PagedList.Mvc.Core/HtmlHelperExtension.cs

+38-38
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,34 @@
66

77
namespace X.PagedList.Mvc.Core;
88

9-
///<summary>
10-
/// Extension methods for generating paging controls that can operate on instances of IPagedList.
11-
///</summary>
9+
/// <summary>
10+
/// Extension methods for generating paging controls that can operate on instances of IPagedList.
11+
/// </summary>
1212
[PublicAPI]
1313
public static class HtmlHelperExtension
1414
{
15-
///<summary>
16-
/// Displays a configurable paging control for instances of PagedList.
17-
///</summary>
18-
///<param name = "html">This method is meant to hook off HtmlHelper as an extension method.</param>
19-
///<param name = "list">The PagedList to use as the data source.</param>
20-
///<param name = "generatePageUrl">A function that takes the page number of the desired page and returns a URL-string that will load that page.</param>
21-
///<returns>Outputs the paging control HTML.</returns>
15+
/// <summary>
16+
/// Displays a configurable paging control for instances of PagedList.
17+
/// </summary>
18+
/// <param name = "html">This method is meant to hook off HtmlHelper as an extension method.</param>
19+
/// <param name = "list">The PagedList to use as the data source.</param>
20+
/// <param name = "generatePageUrl">A function that takes the page number of the desired page and returns a URL-string that will load that page.</param>
21+
/// <returns>Outputs the paging control HTML.</returns>
2222
public static HtmlString PagedListPager(this IHtmlHelper html,
2323
IPagedList? list,
2424
Func<int, string?> generatePageUrl)
2525
{
2626
return PagedListPager(html, list, generatePageUrl, new PagedListRenderOptions());
2727
}
2828

29-
///<summary>
30-
/// Displays a configurable paging control for instances of PagedList.
31-
///</summary>
32-
///<param name = "html">This method is meant to hook off HtmlHelper as an extension method.</param>
33-
///<param name = "list">The PagedList to use as the data source.</param>
34-
///<param name = "generatePageUrl">A function that takes the page number of the desired page and returns a URL-string that will load that page.</param>
35-
///<param name = "options">Formatting options.</param>
36-
///<returns>Outputs the paging control HTML.</returns>
29+
/// <summary>
30+
/// Displays a configurable paging control for instances of PagedList.
31+
/// </summary>
32+
/// <param name = "html">This method is meant to hook off HtmlHelper as an extension method.</param>
33+
/// <param name = "list">The PagedList to use as the data source.</param>
34+
/// <param name = "generatePageUrl">A function that takes the page number of the desired page and returns a URL-string that will load that page.</param>
35+
/// <param name = "options">Formatting options.</param>
36+
/// <returns>Outputs the paging control HTML.</returns>
3737
public static HtmlString PagedListPager(this IHtmlHelper html,
3838
IPagedList? list,
3939
Func<int, string?> generatePageUrl,
@@ -47,26 +47,26 @@ public static HtmlString PagedListPager(this IHtmlHelper html,
4747
return new HtmlString(htmlString);
4848
}
4949

50-
///<summary>
50+
/// <summary>
5151
/// Displays a configurable "Go To Page:" form for instances of PagedList.
52-
///</summary>
53-
///<param name="html">This method is meant to hook off HtmlHelper as an extension method.</param>
54-
///<param name="list">The PagedList to use as the data source.</param>
55-
///<param name="formAction">The URL this form should submit the GET request to.</param>
56-
///<returns>Outputs the "Go To Page:" form HTML.</returns>
52+
/// </summary>
53+
/// <param name="html">This method is meant to hook off HtmlHelper as an extension method.</param>
54+
/// <param name="list">The PagedList to use as the data source.</param>
55+
/// <param name="formAction">The URL this form should submit the GET request to.</param>
56+
/// <returns>Outputs the "Go To Page:" form HTML.</returns>
5757
public static HtmlString PagedListGoToPageForm(this IHtmlHelper html, IPagedList list, string formAction)
5858
{
5959
return PagedListGoToPageForm(html, list, formAction, "page");
6060
}
6161

62-
///<summary>
62+
/// <summary>
6363
/// Displays a configurable "Go To Page:" form for instances of PagedList.
64-
///</summary>
65-
///<param name="html">This method is meant to hook off HtmlHelper as an extension method.</param>
66-
///<param name="list">The PagedList to use as the data source.</param>
67-
///<param name="formAction">The URL this form should submit the GET request to.</param>
68-
///<param name="inputFieldName">The querystring key this form should submit the new page number as.</param>
69-
///<returns>Outputs the "Go To Page:" form HTML.</returns>
64+
/// </summary>
65+
/// <param name="html">This method is meant to hook off HtmlHelper as an extension method.</param>
66+
/// <param name="list">The PagedList to use as the data source.</param>
67+
/// <param name="formAction">The URL this form should submit the GET request to.</param>
68+
/// <param name="inputFieldName">The querystring key this form should submit the new page number as.</param>
69+
/// <returns>Outputs the "Go To Page:" form HTML.</returns>
7070
public static HtmlString PagedListGoToPageForm(this IHtmlHelper html,
7171
IPagedList list,
7272
string formAction,
@@ -75,14 +75,14 @@ public static HtmlString PagedListGoToPageForm(this IHtmlHelper html,
7575
return PagedListGoToPageForm(html, list, formAction, new GoToFormRenderOptions(inputFieldName));
7676
}
7777

78-
///<summary>
78+
/// <summary>
7979
/// Displays a configurable "Go To Page:" form for instances of PagedList.
80-
///</summary>
81-
///<param name="html">This method is meant to hook off HtmlHelper as an extension method.</param>
82-
///<param name="list">The PagedList to use as the data source.</param>
83-
///<param name="formAction">The URL this form should submit the GET request to.</param>
84-
///<param name="options">Formatting options.</param>
85-
///<returns>Outputs the "Go To Page:" form HTML.</returns>
80+
/// </summary>
81+
/// <param name="html">This method is meant to hook off HtmlHelper as an extension method.</param>
82+
/// <param name="list">The PagedList to use as the data source.</param>
83+
/// <param name="formAction">The URL this form should submit the GET request to.</param>
84+
/// <param name="options">Formatting options.</param>
85+
/// <returns>Outputs the "Go To Page:" form HTML.</returns>
8686
public static HtmlString PagedListGoToPageForm(this IHtmlHelper html,
8787
IPagedList list,
8888
string formAction,

0 commit comments

Comments
 (0)