Compare commits

...

6 Commits

Author SHA1 Message Date
Andrew Welker
0764685c51 Merge pull request #1378 from PepperDash/xml-docs
feat: complete XML documentation in PD Core
2026-02-09 09:33:24 -05:00
Neil Dorin
1404899342 Merge pull request #1383 from onryigit/fix/case-insensitive-files 2026-02-03 13:51:56 -07:00
Yiğit Öner
a4759c3e67 fix case sensitivity issue for file searches
Updated logic to use case-insensitive filtering
2026-02-03 23:11:19 +03:00
Erik Meyer
a1029cd7c7 fix: add param info, clean up trailing whitespace and minor formatting 2026-01-27 14:39:50 -05:00
Erik Meyer
b1a5136ec6 fix: remove buildFile.txt 2026-01-27 13:53:26 -05:00
Erik Meyer
a7c4e2fd60 feat: complete XML documentation in PD Core 2026-01-27 13:22:27 -05:00
10 changed files with 89 additions and 21 deletions

View File

@@ -15,23 +15,23 @@ namespace PepperDash.Core
/// Unique Key
/// </summary>
public string Key { get; protected set; }
/// <summary>
/// Gets or sets the Name
/// </summary>
/// <summary>
/// Gets or sets the Name
/// </summary>
public string Name { get; protected set; }
/// <summary>
///
/// Gets or sets a value indicating whether the device is enabled
/// </summary>
public bool Enabled { get; protected set; }
/// <summary>
/// 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.
/// </summary>
// /// <summary>
// /// 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.
// /// </summary>
//public DeviceConfig Config { get; private set; }
/// <summary>
/// Helper method to check if Config exists
/// </summary>
// /// <summary>
// /// Helper method to check if Config exists
// /// </summary>
//public bool HasConfig { get { return Config != null; } }
List<Action> _PreActivationActions;

View File

@@ -41,6 +41,9 @@ namespace PepperDash.Core
CrestronConsole.PrintLine(message);
}
/// <summary>
/// Constructor for DebugConsoleSink
/// </summary>
public DebugConsoleSink(ITextFormatter formatProvider )
{
_textFormatter = formatProvider ?? new JsonFormatter();
@@ -48,6 +51,9 @@ namespace PepperDash.Core
}
/// <summary>
/// Provides extension methods for DebugConsoleSink
/// </summary>
public static class DebugConsoleSinkExtensions
{
/// <summary>

View File

@@ -27,6 +27,9 @@ namespace PepperDash.Core.Logging
CrestronLogger.WriteToLog(message, (uint)logEvent.Level);
}
/// <summary>
/// Constructor for DebugCrestronLoggerSink
/// </summary>
public DebugCrestronLoggerSink()
{
CrestronLogger.Initialize(1, LoggerModeEnum.RM);

View File

@@ -63,6 +63,10 @@ namespace PepperDash.Core.Logging
handler(message);
}
/// <summary>
/// Constructor for DebugErrorLogSink
/// </summary>
/// <param name="formatter">text formatter for log output</param>
public DebugErrorLogSink(ITextFormatter formatter = null)
{
_formatter = formatter;

View File

@@ -4,6 +4,9 @@ using Log = PepperDash.Core.Debug;
namespace PepperDash.Core.Logging
{
/// <summary>
/// Provides extension methods for logging on IKeyed objects
/// </summary>
public static class DebugExtensions
{
/// <summary>

View File

@@ -32,6 +32,9 @@ namespace PepperDash.Core
private const string _certificateName = "selfCres";
private const string _certificatePassword = "cres12345";
/// <summary>
/// Gets the Port
/// </summary>
public int Port
{ get
{
@@ -41,6 +44,9 @@ namespace PepperDash.Core
}
}
/// <summary>
/// Gets the Url
/// </summary>
public string Url
{
get
@@ -58,6 +64,11 @@ namespace PepperDash.Core
private readonly ITextFormatter _textFormatter;
/// <summary>
/// Constructor for DebugWebsocketSink
/// </summary>
/// <param name="formatProvider">text formatter for log output</param>
public DebugWebsocketSink(ITextFormatter formatProvider)
{
@@ -217,6 +228,9 @@ namespace PepperDash.Core
}
}
/// <summary>
/// Provides extension methods for DebugWebsocketSink
/// </summary>
public static class DebugWebsocketSinkExtensions
{
/// <summary>
@@ -237,6 +251,9 @@ namespace PepperDash.Core
{
private DateTime _connectionTime;
/// <summary>
/// Gets the ConnectedDuration
/// </summary>
public TimeSpan ConnectedDuration
{
get
@@ -252,11 +269,17 @@ namespace PepperDash.Core
}
}
/// <summary>
/// Constructor for DebugClient
/// </summary>
public DebugClient()
{
Debug.Console(0, "DebugClient Created");
}
/// <summary>
/// OnOpen method
/// </summary>
protected override void OnOpen()
{
base.OnOpen();
@@ -267,6 +290,9 @@ namespace PepperDash.Core
_connectionTime = DateTime.Now;
}
/// <summary>
/// OnMessage method
/// </summary>
protected override void OnMessage(MessageEventArgs e)
{
base.OnMessage(e);
@@ -274,6 +300,9 @@ namespace PepperDash.Core
Debug.Console(0, "WebSocket UiClient Message: {0}", e.Data);
}
/// <summary>
/// OnClose method
/// </summary>
protected override void OnClose(CloseEventArgs e)
{
base.OnClose(e);
@@ -282,6 +311,9 @@ namespace PepperDash.Core
}
/// <summary>
/// OnError method
/// </summary>
protected override void OnError(WebSocketSharp.ErrorEventArgs e)
{
base.OnError(e);

View File

@@ -5,9 +5,16 @@ using System.Threading.Tasks;
namespace PepperDash.Core.Web.RequestHandlers
{
/// <summary>
/// CWS Base Async Handler, implements IHttpCwsHandler
/// </summary>
public abstract class WebApiBaseRequestAsyncHandler:IHttpCwsHandler
{
private readonly Dictionary<string, Func<HttpCwsContext, Task>> _handlers;
/// <summary>
/// Indicates whether CORS is enabled
/// </summary>
protected readonly bool EnableCors;
/// <summary>

View File

@@ -10,6 +10,10 @@ namespace PepperDash.Core.Web.RequestHandlers
public abstract class WebApiBaseRequestHandler : IHttpCwsHandler
{
private readonly Dictionary<string, Action<HttpCwsContext>> _handlers;
/// <summary>
/// Indicates whether CORS is enabled
/// </summary>
protected readonly bool EnableCors;
/// <summary>

View File

@@ -45,9 +45,9 @@ namespace PepperDash.Core.Web
/// </summary>
public bool IsRegistered { get; private set; }
/// <summary>
/// Http request handler
/// </summary>
// /// <summary>
// /// Http request handler
// /// </summary>
//public IHttpCwsHandler HttpRequestHandler
//{
// get { return _server.HttpRequestHandler; }
@@ -58,9 +58,9 @@ namespace PepperDash.Core.Web
// }
//}
/// <summary>
/// Received request event handler
/// </summary>
// /// <summary>
// /// Received request event handler
// /// </summary>
//public event EventHandler<HttpCwsRequestEventArgs> ReceivedRequestEvent
//{
// add { _server.ReceivedRequestEvent += new HttpCwsRequestEventHandler(value); }

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
@@ -549,7 +549,10 @@ namespace PepperDash.Essentials
var applicationDirectory = new DirectoryInfo(Global.ApplicationDirectoryPathPrefix);
Debug.LogMessage(LogEventLevel.Information, "Searching: {applicationDirectory:l} for embedded assets - {Destination}", applicationDirectory.FullName, Global.FilePathPrefix);
var zipFiles = applicationDirectory.GetFiles("assets*.zip");
var zipFiles = applicationDirectory.GetFiles("*")
.Where(f => f.Name.StartsWith("assets", StringComparison.OrdinalIgnoreCase) &&
f.Extension.Equals(".zip", StringComparison.OrdinalIgnoreCase))
.ToArray();
if (zipFiles.Length > 1)
{
@@ -597,7 +600,10 @@ namespace PepperDash.Essentials
File.Delete(file.FullName);
}
var htmlZipFiles = applicationDirectory.GetFiles("htmlassets*.zip");
var htmlZipFiles = applicationDirectory.GetFiles("*")
.Where(f => f.Name.StartsWith("htmlassets", StringComparison.OrdinalIgnoreCase) &&
f.Extension.Equals(".zip", StringComparison.OrdinalIgnoreCase))
.ToArray();
if (htmlZipFiles.Length > 1)
{
@@ -658,7 +664,10 @@ namespace PepperDash.Essentials
File.Delete(file.FullName);
}
var jsonFiles = applicationDirectory.GetFiles("*configurationFile*.json");
var jsonFiles = applicationDirectory.GetFiles("*")
.Where(f => f.Name.IndexOf("configurationFile", StringComparison.OrdinalIgnoreCase) >= 0 &&
f.Extension.Equals(".json", StringComparison.OrdinalIgnoreCase))
.ToArray();
if (jsonFiles.Length > 1)
{