Skip to content

Commit 621d1a7

Browse files
committed
refactor: comment
1 parent 05563c1 commit 621d1a7

File tree

5 files changed

+34
-6
lines changed

5 files changed

+34
-6
lines changed

src/SimpleW/SimpleW/ISimpleWServer.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,34 @@
66

77
namespace SimpleW {
88

9+
/// <summary>
10+
/// Interface for SimpleWServer
11+
/// </summary>
912
public interface ISimpleWServer {
1013

1114
Router Router { get; }
1215

16+
#region static
17+
1318
string DefaultDocument { get; set; }
1419

1520
bool AutoIndex { get; set; }
1621

1722
void AddMimeTypes(string extension, string contentType);
1823

24+
#endregion static
25+
26+
#region dynamic
27+
1928
void AddDynamicContent(string path = "/", IEnumerable<Type> excludes = null);
2029
void AddDynamicContent(Type controllerType, string path = "/");
2130

2231
void SetToken(string tokenPassphrase, string issuer, DelegateSetTokenWebUser getWebUserCallback = null);
2332

33+
#endregion dynamic
34+
35+
#region websocket
36+
2437
void AddWebSocketContent(string path = "/websocket", IEnumerable<Type> excepts = null);
2538
void AddWebSocketContent(Type controllerType, string path = "/websocket");
2639

@@ -31,13 +44,19 @@ public interface ISimpleWServer {
3144
void RegisterWebUser(Guid id, IWebUser webuser);
3245
void UnregisterWebUser(Guid id);
3346

47+
#endregion websocket
48+
49+
#region cors
50+
3451
string cors_allow_origin { get; set; }
3552
string cors_allow_headers { get; set; }
3653
string cors_allow_methods { get; set; }
3754
string cors_allow_credentials { get; set; }
3855

3956
void AddCORS(string origin = "*", string headers = "*", string methods = "GET,POST,OPTIONS", string credentials = "true");
4057

58+
#endregion cors
59+
4160
}
4261

4362
}

src/SimpleW/SimpleW/ISimpleWSession.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,19 @@
33

44
namespace SimpleW {
55

6+
/// <summary>
7+
/// Interface for SimpleWSession
8+
/// </summary>
69
public interface ISimpleWSession : IWebSocketSession, IHttpSession {
710

11+
/// <summary>
12+
/// The jwt string
13+
/// </summary>
814
string jwt { get; set; }
915

16+
/// <summary>
17+
/// The webuser
18+
/// </summary>
1019
IWebUser webuser { get; set; }
1120

1221
}

src/SimpleW/SimpleW/SimpleWSServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void AddMimeTypes(string extension, string contentType) {
8181

8282
#endregion static
8383

84-
#region restapi
84+
#region dynamic
8585

8686
/// <summary>
8787
/// List of all API controllers
@@ -177,7 +177,7 @@ public void SetToken(string tokenPassphrase, string issuer, DelegateSetTokenWebU
177177
}
178178
}
179179

180-
#endregion restapi
180+
#endregion dynamic
181181

182182
#region websocket
183183

src/SimpleW/SimpleW/SimpleWSSession.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class SimpleWSSession : WssSession, ISimpleWSession {
4040
public SimpleWSSession(SimpleWSServer server) : base(server) {
4141
}
4242

43-
#region http
43+
#region https
4444

4545
/// <summary>
4646
/// Request :
@@ -143,7 +143,7 @@ protected override void OnReceivedRequestError(HttpRequest request, string error
143143
StopWithErrorActivity(activity);
144144
}
145145

146-
#endregion http
146+
#endregion https
147147

148148
#region websocket
149149

src/SimpleW/SimpleW/SimpleWServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void AddMimeTypes(string extension, string contentType) {
8080

8181
#endregion static
8282

83-
#region restapi
83+
#region dynamic
8484

8585
/// <summary>
8686
/// List of all API controllers
@@ -176,7 +176,7 @@ public void SetToken(string tokenPassphrase, string issuer, DelegateSetTokenWebU
176176
}
177177
}
178178

179-
#endregion restapi
179+
#endregion dynamic
180180

181181
#region websocket
182182

0 commit comments

Comments
 (0)