Skip to content

Commit 94c79f9

Browse files
committed
[add] missing XML comments
1 parent b52d364 commit 94c79f9

9 files changed

Lines changed: 247 additions & 5 deletions

File tree

src/Simplify.Web/Modules/ApplicationEnvironment/DynamicEnvironment.cs

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,40 @@
33
namespace Simplify.Web.Modules.ApplicationEnvironment;
44

55
/// <summary>
6-
/// Initializes a new instance of the <see cref="Environment"/> class.
6+
/// Provides the dynamic environment.
77
/// </summary>
8-
/// <param name="appPhysicalPath">The application physical path.</param>
9-
/// <param name="settings">The settings.</param>
8+
/// <seealso cref="IDynamicEnvironment" />
109
public sealed class DynamicEnvironment(IEnvironment environment, ISimplifyWebSettings settings) : IDynamicEnvironment
1110
{
11+
/// <summary>
12+
/// Gets the site current templates directory relative path.
13+
/// </summary>
14+
/// <value>
15+
/// The templates path.
16+
/// </value>
1217
public string TemplatesPath { get; set; } = settings.DefaultTemplatesPath;
1318

19+
/// <summary>
20+
/// Gets the site current templates directory physical path.
21+
/// </summary>
22+
/// <value>
23+
/// The templates physical path.
24+
/// </value>
1425
public string TemplatesPhysicalPath => environment.AppPhysicalPath + TemplatesPath + "/";
1526

27+
/// <summary>
28+
/// Gets the site current style.
29+
/// </summary>
30+
/// <value>
31+
/// The site style.
32+
/// </value>
1633
public string SiteStyle { get; set; } = settings.DefaultStyle;
1734

35+
/// <summary>
36+
/// Gets or sets the current master page template file name.
37+
/// </summary>
38+
/// <value>
39+
/// The name of the master template file.
40+
/// </value>
1841
public string MasterTemplateFileName { get; set; } = settings.DefaultMasterTemplateFileName;
1942
}

src/Simplify.Web/Modules/ApplicationEnvironment/Environment.cs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
namespace Simplify.Web.Modules.ApplicationEnvironment;
44

5+
/// <summary>
6+
/// Provides the environment.
7+
/// </summary>
8+
/// <seealso cref="IEnvironment" />
59
public sealed class Environment : IEnvironment
610
{
711
/// <summary>
8-
/// Initializes a new instance of the <see cref="Environment"/> class.
12+
/// Initializes a new instance of the <see cref="Environment" /> class.
913
/// </summary>
1014
/// <param name="appPhysicalPath">The application physical path.</param>
1115
/// <param name="settings">The settings.</param>
@@ -20,9 +24,27 @@ public Environment(string appPhysicalPath, ISimplifyWebSettings settings)
2024
DataPath = settings.DataPath;
2125
}
2226

27+
/// <summary>
28+
/// Gets the application physical path.
29+
/// </summary>
30+
/// <value>
31+
/// The application physical path.
32+
/// </value>
2333
public string AppPhysicalPath { get; }
2434

35+
/// <summary>
36+
/// Gets the data path.
37+
/// </summary>
38+
/// <value>
39+
/// The data path.
40+
/// </value>
2541
public string DataPath { get; }
2642

43+
/// <summary>
44+
/// Gets the data physical path.
45+
/// </summary>
46+
/// <value>
47+
/// The data physical path.
48+
/// </value>
2749
public string DataPhysicalPath => AppPhysicalPath + DataPath + "/";
2850
}

src/Simplify.Web/Modules/ApplicationEnvironment/IDynamicEnvironment.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,32 @@ public interface IDynamicEnvironment
88
/// <summary>
99
/// Gets the site current templates directory relative path.
1010
/// </summary>
11+
/// <value>
12+
/// The templates path.
13+
/// </value>
1114
string TemplatesPath { get; set; }
1215

1316
/// <summary>
1417
/// Gets the site current templates directory physical path.
1518
/// </summary>
19+
/// <value>
20+
/// The templates physical path.
21+
/// </value>
1622
string TemplatesPhysicalPath { get; }
1723

1824
/// <summary>
1925
/// Gets the site current style.
2026
/// </summary>
27+
/// <value>
28+
/// The site style.
29+
/// </value>
2130
string SiteStyle { get; set; }
2231

2332
/// <summary>
2433
/// Gets or sets the current master page template file name.
2534
/// </summary>
35+
/// <value>
36+
/// The name of the master template file.
37+
/// </value>
2638
string MasterTemplateFileName { get; set; }
2739
}

src/Simplify.Web/Modules/ApplicationEnvironment/IEnvironment.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ public interface IEnvironment
1616
/// <summary>
1717
/// Gets the data path.
1818
/// </summary>
19+
/// <value>
20+
/// The data path.
21+
/// </value>
1922
string DataPath { get; }
2023

2124
/// <summary>
2225
/// Gets the data physical path.
2326
/// </summary>
27+
/// <value>
28+
/// The data physical path.
29+
/// </value>
2430
string DataPhysicalPath { get; }
2531
}

src/Simplify.Web/Modules/Context/IWebContext.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,65 @@ public interface IWebContext
1111
/// <summary>
1212
/// Gets the current web-site route, for example: "/" or "/user/delete/15"/
1313
/// </summary>
14+
/// <value>
15+
/// The route.
16+
/// </value>
1417
string Route { get; }
1518

1619
/// <summary>
1720
/// Gets the site root url, for example: http://mysite.com or http://localhost/mysite//
1821
/// </summary>
22+
/// <value>
23+
/// The site URL.
24+
/// </value>
1925
string SiteUrl { get; }
2026

2127
/// <summary>
2228
/// Gets the virtual path.
2329
/// </summary>
30+
/// <value>
31+
/// The virtual path.
32+
/// </value>
2433
string VirtualPath { get; }
2534

2635
/// <summary>
2736
/// Gets the context for the current HTTP request.
2837
/// </summary>
38+
/// <value>
39+
/// The context.
40+
/// </value>
2941
HttpContext Context { get; }
3042

3143
/// <summary>
3244
/// Gets the request for the current HTTP request.
3345
/// </summary>
46+
/// <value>
47+
/// The request.
48+
/// </value>
3449
HttpRequest Request { get; }
3550

3651
/// <summary>
3752
/// Gets the response for the current HTTP request.
3853
/// </summary>
54+
/// <value>
55+
/// The response.
56+
/// </value>
3957
HttpResponse Response { get; }
4058

4159
/// <summary>
4260
/// Gets the query string for current HTTP request.
4361
/// </summary>
62+
/// <value>
63+
/// The query.
64+
/// </value>
4465
IQueryCollection Query { get; }
4566

4667
/// <summary>
4768
/// Gets the form data of post HTTP request.
4869
/// </summary>
70+
/// <value>
71+
/// The form.
72+
/// </value>
4973
IFormCollection Form { get; }
5074

5175
/// <summary>
@@ -59,6 +83,9 @@ public interface IWebContext
5983
/// <summary>
6084
/// Gets a value indicating whether current request context user is not null and is authenticated.
6185
/// </summary>
86+
/// <value>
87+
/// <c>true</c> if this instance is authenticated; otherwise, <c>false</c>.
88+
/// </value>
6289
bool IsAuthenticated { get; }
6390

6491
/// <summary>

src/Simplify.Web/Modules/Context/WebContext.cs

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Simplify.Web.Modules.Context;
99
/// <summary>
1010
/// Provides the web context.
1111
/// </summary>
12+
/// <seealso cref="IWebContext" />
1213
public sealed class WebContext : IWebContext
1314
{
1415
private readonly SemaphoreSlim _formReadSemaphore = new(1, 1);
@@ -18,7 +19,7 @@ public sealed class WebContext : IWebContext
1819
private string? _requestBody;
1920

2021
/// <summary>
21-
/// Initializes a new instance of the <see cref="WebContext"/> class.
22+
/// Initializes a new instance of the <see cref="WebContext" /> class.
2223
/// </summary>
2324
/// <param name="context">The HTTP context.</param>
2425
public WebContext(HttpContext context)
@@ -37,20 +38,69 @@ public WebContext(HttpContext context)
3738
Route = Request.Path.Value ?? "/";
3839
}
3940

41+
/// <summary>
42+
/// Gets the current web-site route, for example: "/" or "/user/delete/15"/
43+
/// </summary>
44+
/// <value>
45+
/// The route.
46+
/// </value>
4047
public string Route { get; }
4148

49+
/// <summary>
50+
/// Gets the site root url, for example: http://mysite.com or http://localhost/mysite//
51+
/// </summary>
52+
/// <value>
53+
/// The site URL.
54+
/// </value>
4255
public string SiteUrl { get; }
4356

57+
/// <summary>
58+
/// Gets the virtual path.
59+
/// </summary>
60+
/// <value>
61+
/// The virtual path.
62+
/// </value>
4463
public string VirtualPath { get; }
4564

65+
/// <summary>
66+
/// Gets the context for the current HTTP request.
67+
/// </summary>
68+
/// <value>
69+
/// The context.
70+
/// </value>
4671
public HttpContext Context { get; }
4772

73+
/// <summary>
74+
/// Gets the request for the current HTTP request.
75+
/// </summary>
76+
/// <value>
77+
/// The request.
78+
/// </value>
4879
public HttpRequest Request { get; }
4980

81+
/// <summary>
82+
/// Gets the response for the current HTTP request.
83+
/// </summary>
84+
/// <value>
85+
/// The response.
86+
/// </value>
5087
public HttpResponse Response { get; }
5188

89+
/// <summary>
90+
/// Gets the query string for current HTTP request.
91+
/// </summary>
92+
/// <value>
93+
/// The query.
94+
/// </value>
5295
public IQueryCollection Query { get; }
5396

97+
/// <summary>
98+
/// Gets the form data of post HTTP request.
99+
/// </summary>
100+
/// <value>
101+
/// The form.
102+
/// </value>
103+
/// <exception cref="InvalidOperationException">Form is null</exception>
54104
public IFormCollection Form
55105
{
56106
get
@@ -67,10 +117,28 @@ public IFormCollection Form
67117
}
68118
}
69119

120+
/// <summary>
121+
/// Gets a value indicating whether this request is ajax request.
122+
/// </summary>
123+
/// <value>
124+
/// <c>true</c> if current request is ajax request; otherwise, <c>false</c>.
125+
/// </value>
70126
public bool IsAjax { get; }
71127

128+
/// <summary>
129+
/// Gets a value indicating whether current request context user is not null and is authenticated.
130+
/// </summary>
131+
/// <value>
132+
/// <c>true</c> if this instance is authenticated; otherwise, <c>false</c>.
133+
/// </value>
72134
public bool IsAuthenticated => Context.User is { Identity.IsAuthenticated: true };
73135

136+
/// <summary>
137+
/// Gets the request body.
138+
/// </summary>
139+
/// <value>
140+
/// The request body.
141+
/// </value>
74142
public string RequestBody
75143
{
76144
get
@@ -84,6 +152,9 @@ public string RequestBody
84152
}
85153
}
86154

155+
/// <summary>
156+
/// Reads the form asynchronously.
157+
/// </summary>
87158
public async Task ReadFormAsync()
88159
{
89160
if (_form != null)
@@ -101,6 +172,9 @@ public async Task ReadFormAsync()
101172
}
102173
}
103174

175+
/// <summary>
176+
/// Reads the request body asynchronously.
177+
/// </summary>
104178
public async Task ReadRequestBodyAsync()
105179
{
106180
if (_requestBody != null)

src/Simplify.Web/Modules/Context/WebContextProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace Simplify.Web.Modules.Context;
55
/// <summary>
66
/// Provides the web context provider.
77
/// </summary>
8+
/// <seealso cref="IWebContextProvider" />
89
public sealed class WebContextProvider : IWebContextProvider
910
{
1011
private IWebContext? _webContext;

src/Simplify.Web/Modules/Data/Html/IListsGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,6 @@ string GenerateListFromEnum<T>(bool displayNotSelectedMessage = true, bool selec
116116
/// <summary>
117117
/// Generates an HTML list default item.
118118
/// </summary>
119+
/// <param name="isSelected">if set to <c>true</c> then the item will be generated as selected.</param>
119120
string GenerateDefaultListItem(bool isSelected = true);
120121
}

0 commit comments

Comments
 (0)