Skip to content

Commit a7c4e2f

Browse files
committed
feat: complete XML documentation in PD Core
1 parent 4fa7a42 commit a7c4e2f

10 files changed

Lines changed: 5315 additions & 16 deletions

buildFile.txt

Lines changed: 5243 additions & 0 deletions
Large diffs are not rendered by default.

src/PepperDash.Core/Device.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ public class Device : IKeyName
1515
/// Unique Key
1616
/// </summary>
1717
public string Key { get; protected set; }
18-
/// <summary>
19-
/// Gets or sets the Name
20-
/// </summary>
18+
/// <summary>
19+
/// Gets or sets the Name
20+
/// </summary>
2121
public string Name { get; protected set; }
2222
/// <summary>
2323
///
2424
/// </summary>
2525
public bool Enabled { get; protected set; }
2626

27-
/// <summary>
28-
/// A place to store reference to the original config object, if any. These values should
29-
/// NOT be used as properties on the device as they are all publicly-settable values.
30-
/// </summary>
27+
// /// <summary>
28+
// /// A place to store reference to the original config object, if any. These values should
29+
// /// NOT be used as properties on the device as they are all publicly-settable values.
30+
// /// </summary>
3131
//public DeviceConfig Config { get; private set; }
32-
/// <summary>
33-
/// Helper method to check if Config exists
34-
/// </summary>
32+
// /// <summary>
33+
// /// Helper method to check if Config exists
34+
// /// </summary>
3535
//public bool HasConfig { get { return Config != null; } }
3636

3737
List<Action> _PreActivationActions;

src/PepperDash.Core/Logging/DebugConsoleSink.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,19 @@ public void Emit(LogEvent logEvent)
4141
CrestronConsole.PrintLine(message);
4242
}
4343

44+
/// <summary>
45+
/// Constructor for DebugConsoleSink
46+
/// </summary>
4447
public DebugConsoleSink(ITextFormatter formatProvider )
4548
{
4649
_textFormatter = formatProvider ?? new JsonFormatter();
4750
}
4851

4952
}
5053

54+
/// <summary>
55+
/// Provides extension methods for DebugConsoleSink
56+
/// </summary>
5157
public static class DebugConsoleSinkExtensions
5258
{
5359
/// <summary>

src/PepperDash.Core/Logging/DebugCrestronLoggerSink.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public void Emit(LogEvent logEvent)
2727
CrestronLogger.WriteToLog(message, (uint)logEvent.Level);
2828
}
2929

30+
/// <summary>
31+
/// Constructor for DebugCrestronLoggerSink
32+
/// </summary>
3033
public DebugCrestronLoggerSink()
3134
{
3235
CrestronLogger.Initialize(1, LoggerModeEnum.RM);

src/PepperDash.Core/Logging/DebugErrorLogSink.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public void Emit(LogEvent logEvent)
6363
handler(message);
6464
}
6565

66+
/// <summary>
67+
/// Constructor for DebugErrorLogSink
68+
/// </summary>
6669
public DebugErrorLogSink(ITextFormatter formatter = null)
6770
{
6871
_formatter = formatter;

src/PepperDash.Core/Logging/DebugExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace PepperDash.Core.Logging
66
{
7+
/// <summary>
8+
/// Provides extension methods for logging on IKeyed objects
9+
/// </summary>
710
public static class DebugExtensions
811
{
912
/// <summary>

src/PepperDash.Core/Logging/DebugWebsocketSink.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public class DebugWebsocketSink : ILogEventSink
3232
private const string _certificateName = "selfCres";
3333
private const string _certificatePassword = "cres12345";
3434

35+
/// <summary>
36+
/// Gets the Port
37+
/// </summary>
3538
public int Port
3639
{ get
3740
{
@@ -41,6 +44,9 @@ public int Port
4144
}
4245
}
4346

47+
/// <summary>
48+
/// Gets the Url
49+
/// </summary>
4450
public string Url
4551
{
4652
get
@@ -58,6 +64,9 @@ public string Url
5864

5965
private readonly ITextFormatter _textFormatter;
6066

67+
/// <summary>
68+
/// Constructor for DebugWebsocketSink
69+
/// </summary>
6170
public DebugWebsocketSink(ITextFormatter formatProvider)
6271
{
6372

@@ -217,6 +226,9 @@ public void StopServer()
217226
}
218227
}
219228

229+
/// <summary>
230+
/// Provides extension methods for DebugWebsocketSink
231+
/// </summary>
220232
public static class DebugWebsocketSinkExtensions
221233
{
222234
/// <summary>
@@ -237,6 +249,9 @@ public class DebugClient : WebSocketBehavior
237249
{
238250
private DateTime _connectionTime;
239251

252+
/// <summary>
253+
/// Gets the ConnectedDuration
254+
/// </summary>
240255
public TimeSpan ConnectedDuration
241256
{
242257
get
@@ -252,11 +267,17 @@ public TimeSpan ConnectedDuration
252267
}
253268
}
254269

270+
/// <summary>
271+
/// Constructor for DebugClient
272+
/// </summary>
255273
public DebugClient()
256274
{
257275
Debug.Console(0, "DebugClient Created");
258276
}
259277

278+
/// <summary>
279+
/// OnOpen method
280+
/// </summary>
260281
protected override void OnOpen()
261282
{
262283
base.OnOpen();
@@ -267,13 +288,19 @@ protected override void OnOpen()
267288
_connectionTime = DateTime.Now;
268289
}
269290

291+
/// <summary>
292+
/// OnMessage method
293+
/// </summary>
270294
protected override void OnMessage(MessageEventArgs e)
271295
{
272296
base.OnMessage(e);
273297

274298
Debug.Console(0, "WebSocket UiClient Message: {0}", e.Data);
275299
}
276300

301+
/// <summary>
302+
/// OnClose method
303+
/// </summary>
277304
protected override void OnClose(CloseEventArgs e)
278305
{
279306
base.OnClose(e);
@@ -282,6 +309,9 @@ protected override void OnClose(CloseEventArgs e)
282309

283310
}
284311

312+
/// <summary>
313+
/// OnError method
314+
/// </summary>
285315
protected override void OnError(WebSocketSharp.ErrorEventArgs e)
286316
{
287317
base.OnError(e);

src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestAsyncHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55

66
namespace PepperDash.Core.Web.RequestHandlers
77
{
8+
/// <summary>
9+
/// CWS Base Async Handler, implements IHttpCwsHandler
10+
/// </summary>
811
public abstract class WebApiBaseRequestAsyncHandler:IHttpCwsHandler
912
{
1013
private readonly Dictionary<string, Func<HttpCwsContext, Task>> _handlers;
14+
15+
/// <summary>
16+
/// Indicates whether CORS is enabled
17+
/// </summary>
1118
protected readonly bool EnableCors;
1219

1320
/// <summary>

src/PepperDash.Core/Web/RequestHandlers/WebApiBaseRequestHandler.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ namespace PepperDash.Core.Web.RequestHandlers
1010
public abstract class WebApiBaseRequestHandler : IHttpCwsHandler
1111
{
1212
private readonly Dictionary<string, Action<HttpCwsContext>> _handlers;
13+
14+
/// <summary>
15+
/// Indicates whether CORS is enabled
16+
/// </summary>
1317
protected readonly bool EnableCors;
1418

1519
/// <summary>

src/PepperDash.Core/Web/WebApiServer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public class WebApiServer : IKeyName
4545
/// </summary>
4646
public bool IsRegistered { get; private set; }
4747

48-
/// <summary>
49-
/// Http request handler
50-
/// </summary>
48+
// /// <summary>
49+
// /// Http request handler
50+
// /// </summary>
5151
//public IHttpCwsHandler HttpRequestHandler
5252
//{
5353
// get { return _server.HttpRequestHandler; }
@@ -58,9 +58,9 @@ public class WebApiServer : IKeyName
5858
// }
5959
//}
6060

61-
/// <summary>
62-
/// Received request event handler
63-
/// </summary>
61+
// /// <summary>
62+
// /// Received request event handler
63+
// /// </summary>
6464
//public event EventHandler<HttpCwsRequestEventArgs> ReceivedRequestEvent
6565
//{
6666
// add { _server.ReceivedRequestEvent += new HttpCwsRequestEventHandler(value); }

0 commit comments

Comments
 (0)