mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-20 07:56:50 +00:00
feat: complete XML documentation in PD Core
This commit is contained in:
parent
4fa7a42330
commit
a7c4e2fd60
10 changed files with 5315 additions and 16 deletions
5243
buildFile.txt
Normal file
5243
buildFile.txt
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -15,23 +15,23 @@ namespace PepperDash.Core
|
||||||
/// Unique Key
|
/// Unique Key
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Key { get; protected set; }
|
public string Key { get; protected set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Name
|
/// Gets or sets the Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; protected set; }
|
public string Name { get; protected set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Enabled { get; protected set; }
|
public bool Enabled { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// A place to store reference to the original config object, if any. These values should
|
// /// A place to store reference to the original config object, if any. These values should
|
||||||
/// NOT be used as properties on the device as they are all publicly-settable values.
|
// /// NOT be used as properties on the device as they are all publicly-settable values.
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
//public DeviceConfig Config { get; private set; }
|
//public DeviceConfig Config { get; private set; }
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// Helper method to check if Config exists
|
// /// Helper method to check if Config exists
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
//public bool HasConfig { get { return Config != null; } }
|
//public bool HasConfig { get { return Config != null; } }
|
||||||
|
|
||||||
List<Action> _PreActivationActions;
|
List<Action> _PreActivationActions;
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ namespace PepperDash.Core
|
||||||
CrestronConsole.PrintLine(message);
|
CrestronConsole.PrintLine(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for DebugConsoleSink
|
||||||
|
/// </summary>
|
||||||
public DebugConsoleSink(ITextFormatter formatProvider )
|
public DebugConsoleSink(ITextFormatter formatProvider )
|
||||||
{
|
{
|
||||||
_textFormatter = formatProvider ?? new JsonFormatter();
|
_textFormatter = formatProvider ?? new JsonFormatter();
|
||||||
|
|
@ -48,6 +51,9 @@ namespace PepperDash.Core
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provides extension methods for DebugConsoleSink
|
||||||
|
/// </summary>
|
||||||
public static class DebugConsoleSinkExtensions
|
public static class DebugConsoleSinkExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@ namespace PepperDash.Core.Logging
|
||||||
CrestronLogger.WriteToLog(message, (uint)logEvent.Level);
|
CrestronLogger.WriteToLog(message, (uint)logEvent.Level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for DebugCrestronLoggerSink
|
||||||
|
/// </summary>
|
||||||
public DebugCrestronLoggerSink()
|
public DebugCrestronLoggerSink()
|
||||||
{
|
{
|
||||||
CrestronLogger.Initialize(1, LoggerModeEnum.RM);
|
CrestronLogger.Initialize(1, LoggerModeEnum.RM);
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,9 @@ namespace PepperDash.Core.Logging
|
||||||
handler(message);
|
handler(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for DebugErrorLogSink
|
||||||
|
/// </summary>
|
||||||
public DebugErrorLogSink(ITextFormatter formatter = null)
|
public DebugErrorLogSink(ITextFormatter formatter = null)
|
||||||
{
|
{
|
||||||
_formatter = formatter;
|
_formatter = formatter;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,9 @@ using Log = PepperDash.Core.Debug;
|
||||||
|
|
||||||
namespace PepperDash.Core.Logging
|
namespace PepperDash.Core.Logging
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Provides extension methods for logging on IKeyed objects
|
||||||
|
/// </summary>
|
||||||
public static class DebugExtensions
|
public static class DebugExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@ namespace PepperDash.Core
|
||||||
private const string _certificateName = "selfCres";
|
private const string _certificateName = "selfCres";
|
||||||
private const string _certificatePassword = "cres12345";
|
private const string _certificatePassword = "cres12345";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the Port
|
||||||
|
/// </summary>
|
||||||
public int Port
|
public int Port
|
||||||
{ get
|
{ get
|
||||||
{
|
{
|
||||||
|
|
@ -41,6 +44,9 @@ namespace PepperDash.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the Url
|
||||||
|
/// </summary>
|
||||||
public string Url
|
public string Url
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -58,6 +64,9 @@ namespace PepperDash.Core
|
||||||
|
|
||||||
private readonly ITextFormatter _textFormatter;
|
private readonly ITextFormatter _textFormatter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for DebugWebsocketSink
|
||||||
|
/// </summary>
|
||||||
public DebugWebsocketSink(ITextFormatter formatProvider)
|
public DebugWebsocketSink(ITextFormatter formatProvider)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -217,6 +226,9 @@ namespace PepperDash.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provides extension methods for DebugWebsocketSink
|
||||||
|
/// </summary>
|
||||||
public static class DebugWebsocketSinkExtensions
|
public static class DebugWebsocketSinkExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -237,6 +249,9 @@ namespace PepperDash.Core
|
||||||
{
|
{
|
||||||
private DateTime _connectionTime;
|
private DateTime _connectionTime;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the ConnectedDuration
|
||||||
|
/// </summary>
|
||||||
public TimeSpan ConnectedDuration
|
public TimeSpan ConnectedDuration
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -252,11 +267,17 @@ namespace PepperDash.Core
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructor for DebugClient
|
||||||
|
/// </summary>
|
||||||
public DebugClient()
|
public DebugClient()
|
||||||
{
|
{
|
||||||
Debug.Console(0, "DebugClient Created");
|
Debug.Console(0, "DebugClient Created");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnOpen method
|
||||||
|
/// </summary>
|
||||||
protected override void OnOpen()
|
protected override void OnOpen()
|
||||||
{
|
{
|
||||||
base.OnOpen();
|
base.OnOpen();
|
||||||
|
|
@ -267,6 +288,9 @@ namespace PepperDash.Core
|
||||||
_connectionTime = DateTime.Now;
|
_connectionTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnMessage method
|
||||||
|
/// </summary>
|
||||||
protected override void OnMessage(MessageEventArgs e)
|
protected override void OnMessage(MessageEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnMessage(e);
|
base.OnMessage(e);
|
||||||
|
|
@ -274,6 +298,9 @@ namespace PepperDash.Core
|
||||||
Debug.Console(0, "WebSocket UiClient Message: {0}", e.Data);
|
Debug.Console(0, "WebSocket UiClient Message: {0}", e.Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnClose method
|
||||||
|
/// </summary>
|
||||||
protected override void OnClose(CloseEventArgs e)
|
protected override void OnClose(CloseEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnClose(e);
|
base.OnClose(e);
|
||||||
|
|
@ -282,6 +309,9 @@ namespace PepperDash.Core
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OnError method
|
||||||
|
/// </summary>
|
||||||
protected override void OnError(WebSocketSharp.ErrorEventArgs e)
|
protected override void OnError(WebSocketSharp.ErrorEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnError(e);
|
base.OnError(e);
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,16 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace PepperDash.Core.Web.RequestHandlers
|
namespace PepperDash.Core.Web.RequestHandlers
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// CWS Base Async Handler, implements IHttpCwsHandler
|
||||||
|
/// </summary>
|
||||||
public abstract class WebApiBaseRequestAsyncHandler:IHttpCwsHandler
|
public abstract class WebApiBaseRequestAsyncHandler:IHttpCwsHandler
|
||||||
{
|
{
|
||||||
private readonly Dictionary<string, Func<HttpCwsContext, Task>> _handlers;
|
private readonly Dictionary<string, Func<HttpCwsContext, Task>> _handlers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether CORS is enabled
|
||||||
|
/// </summary>
|
||||||
protected readonly bool EnableCors;
|
protected readonly bool EnableCors;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@ namespace PepperDash.Core.Web.RequestHandlers
|
||||||
public abstract class WebApiBaseRequestHandler : IHttpCwsHandler
|
public abstract class WebApiBaseRequestHandler : IHttpCwsHandler
|
||||||
{
|
{
|
||||||
private readonly Dictionary<string, Action<HttpCwsContext>> _handlers;
|
private readonly Dictionary<string, Action<HttpCwsContext>> _handlers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates whether CORS is enabled
|
||||||
|
/// </summary>
|
||||||
protected readonly bool EnableCors;
|
protected readonly bool EnableCors;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,9 @@ namespace PepperDash.Core.Web
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsRegistered { get; private set; }
|
public bool IsRegistered { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// Http request handler
|
// /// Http request handler
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
//public IHttpCwsHandler HttpRequestHandler
|
//public IHttpCwsHandler HttpRequestHandler
|
||||||
//{
|
//{
|
||||||
// get { return _server.HttpRequestHandler; }
|
// get { return _server.HttpRequestHandler; }
|
||||||
|
|
@ -58,9 +58,9 @@ namespace PepperDash.Core.Web
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// Received request event handler
|
// /// Received request event handler
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
//public event EventHandler<HttpCwsRequestEventArgs> ReceivedRequestEvent
|
//public event EventHandler<HttpCwsRequestEventArgs> ReceivedRequestEvent
|
||||||
//{
|
//{
|
||||||
// add { _server.ReceivedRequestEvent += new HttpCwsRequestEventHandler(value); }
|
// add { _server.ReceivedRequestEvent += new HttpCwsRequestEventHandler(value); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue