docs: update XML comments for Essentials Core

This commit is contained in:
Andrew Welker 2026-02-09 08:58:52 -06:00
parent 0764685c51
commit f88bb13367
260 changed files with 7018 additions and 1318 deletions

View file

@ -10,15 +10,18 @@ namespace PepperDash.Essentials.Core.Web
/// </summary>
public class EssentialsWebApiFactory : EssentialsDeviceFactory<EssentialsWebApi>
{
/// <summary>
/// Constructor
/// </summary>
public EssentialsWebApiFactory()
{
TypeNames = new List<string> { "EssentialsWebApi" };
}
/// <summary>
/// BuildDevice method
/// </summary>
/// <inheritdoc />
/// <summary>
/// BuildDevice method
/// </summary>
/// <inheritdoc />
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Essentials Web API Server");

View file

@ -7,11 +7,14 @@ using PepperDash.Core;
namespace PepperDash.Essentials.Core.Web
{
/// <summary>
/// EssentialsWebApiHelpers class
/// </summary>
public static class EssentialsWebApiHelpers
{
/// <summary>
/// GetRequestBody method
/// </summary>
/// <summary>
/// GetRequestBody method
/// </summary>
public static string GetRequestBody(this HttpCwsRequest request)
{
var bytes = new byte[request.ContentLength];
@ -21,9 +24,9 @@ namespace PepperDash.Essentials.Core.Web
return Encoding.UTF8.GetString(bytes, 0, bytes.Length);
}
/// <summary>
/// MapToAssemblyObject method
/// </summary>
/// <summary>
/// MapToAssemblyObject method
/// </summary>
public static object MapToAssemblyObject(LoadedAssembly assembly)
{
return new
@ -33,9 +36,9 @@ namespace PepperDash.Essentials.Core.Web
};
}
/// <summary>
/// MapToDeviceListObject method
/// </summary>
/// <summary>
/// MapToDeviceListObject method
/// </summary>
public static object MapToDeviceListObject(IKeyed device)
{
return new
@ -47,9 +50,9 @@ namespace PepperDash.Essentials.Core.Web
};
}
/// <summary>
/// MapJoinToObject method
/// </summary>
/// <summary>
/// MapJoinToObject method
/// </summary>
public static object MapJoinToObject(string key, JoinMapBaseAdvanced join)
{
var kp = new KeyValuePair<string, JoinMapBaseAdvanced>(key, join);
@ -57,9 +60,9 @@ namespace PepperDash.Essentials.Core.Web
return MapJoinToObject(kp);
}
/// <summary>
/// MapJoinToObject method
/// </summary>
/// <summary>
/// MapJoinToObject method
/// </summary>
public static object MapJoinToObject(KeyValuePair<string, JoinMapBaseAdvanced> join)
{
return new
@ -69,9 +72,9 @@ namespace PepperDash.Essentials.Core.Web
};
}
/// <summary>
/// MapJoinDataCompleteToObject method
/// </summary>
/// <summary>
/// MapJoinDataCompleteToObject method
/// </summary>
public static object MapJoinDataCompleteToObject(KeyValuePair<string, JoinDataComplete> joinData)
{
return new
@ -85,9 +88,9 @@ namespace PepperDash.Essentials.Core.Web
};
}
/// <summary>
/// MapDeviceTypeToObject method
/// </summary>
/// <summary>
/// MapDeviceTypeToObject method
/// </summary>
public static object MapDeviceTypeToObject(string key, DeviceFactoryWrapper device)
{
var kp = new KeyValuePair<string, DeviceFactoryWrapper>(key, device);
@ -95,9 +98,9 @@ namespace PepperDash.Essentials.Core.Web
return MapDeviceTypeToObject(kp);
}
/// <summary>
/// MapDeviceTypeToObject method
/// </summary>
/// <summary>
/// MapDeviceTypeToObject method
/// </summary>
public static object MapDeviceTypeToObject(KeyValuePair<string, DeviceFactoryWrapper> device)
{
return new

View file

@ -2,15 +2,15 @@
namespace PepperDash.Essentials.Core.Web
{
/// <summary>
/// Represents a EssentialsWebApiPropertiesConfig
/// </summary>
/// <summary>
/// Represents a EssentialsWebApiPropertiesConfig
/// </summary>
public class EssentialsWebApiPropertiesConfig
{
/// <summary>
/// Gets or sets the BasePath
/// </summary>
[JsonProperty("basePath")]
/// <summary>
/// Gets or sets the BasePath
/// </summary>
public string BasePath { get; set; }
}
}

View file

@ -80,16 +80,16 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
}
}
/// <summary>
/// Represents a AppDebug
/// </summary>
/// <summary>
/// Represents a AppDebug
/// </summary>
public class AppDebug
{
[JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
/// <summary>
/// Gets or sets the MinimumLevel
/// </summary>
[JsonProperty("minimumLevel", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter))]
public LogEventLevel MinimumLevel { get; set; }
}
}

View file

@ -18,6 +18,9 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary>
public class DebugSessionRequestHandler : WebApiBaseRequestHandler
{
/// <summary>
/// Constructor
/// </summary>
public DebugSessionRequestHandler()
: base(true)
{

View file

@ -5,9 +5,9 @@ using PepperDash.Core.Web.RequestHandlers;
namespace PepperDash.Essentials.Core.Web.RequestHandlers
{
/// <summary>
/// Represents a DoNotLoadConfigOnNextBootRequestHandler
/// </summary>
/// <summary>
/// Represents a DoNotLoadConfigOnNextBootRequestHandler
/// </summary>
public class DoNotLoadConfigOnNextBootRequestHandler : WebApiBaseRequestHandler
{
/// <summary>
@ -79,15 +79,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
}
}
/// <summary>
/// Represents a Data
/// </summary>
/// <summary>
/// Represents a Data
/// </summary>
public class Data
{
/// <summary>
/// Gets or sets the DoNotLoadConfigOnNextBoot
/// </summary>
[JsonProperty("doNotLoadConfigOnNextBoot", NullValueHandling = NullValueHandling.Ignore)]
/// <summary>
/// Gets or sets the DoNotLoadConfigOnNextBoot
/// </summary>
public bool DoNotLoadConfigOnNextBoot { get; set; }
}
}

View file

@ -13,11 +13,20 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
private HttpCwsRouteCollection routeCollection;
private string basePath;
/// <summary>
/// Constructor
/// </summary>
/// <param name="routeCollection"></param>
/// <param name="basePath"></param>
public GetRoutesHandler(HttpCwsRouteCollection routeCollection, string basePath) {
this.routeCollection = routeCollection;
this.basePath = basePath;
}
/// <summary>
/// Handles GET method requests
/// </summary>
/// <param name="context"></param>
protected override void HandleGet(HttpCwsContext context)
{
var currentIp = CrestronEthernetHelper.GetEthernetParameter(
@ -49,16 +58,16 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary>
public class RoutesResponseObject
{
[JsonProperty("url")]
/// <summary>
/// Gets or sets the Url
/// </summary>
[JsonProperty("url")]
public string Url { set; get; }
[JsonProperty("routes")]
/// <summary>
/// Gets or sets the Routes
/// </summary>
[JsonProperty("routes")]
public HttpCwsRouteCollection Routes { get; set; }
}
}

View file

@ -12,8 +12,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary>
public class GetRoutingPortsHandler : WebApiBaseRequestHandler
{
/// <summary>
/// Constructor
/// </summary>
public GetRoutingPortsHandler() : base(true) { }
/// <summary>
/// Handles the GET request
/// </summary>
/// <param name="context"></param>
protected override void HandleGet(HttpCwsContext context)
{
var routeData = context.Request.RouteData;
@ -63,17 +70,18 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
}
}
internal class ReturnValue {
[JsonProperty("inputPorts", NullValueHandling = NullValueHandling.Ignore)]
internal class ReturnValue
{
/// <summary>
/// Gets or sets the InputPorts
/// </summary>
[JsonProperty("inputPorts", NullValueHandling = NullValueHandling.Ignore)]
public List<string> InputPorts { get; set; }
[JsonProperty("outputPorts", NullValueHandling = NullValueHandling.Ignore)]
/// <summary>
/// Gets or sets the OutputPorts
/// </summary>
[JsonProperty("outputPorts", NullValueHandling = NullValueHandling.Ignore)]
public List<string> OutputPorts { get; set; }
}
}

View file

@ -11,8 +11,15 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
/// </summary>
public class GetTieLinesRequestHandler : WebApiBaseRequestHandler
{
/// <summary>
/// Constructor
/// </summary>
public GetTieLinesRequestHandler() : base(true) { }
/// <summary>
/// Handles the GET request
/// </summary>
/// <param name="context"></param>
protected override void HandleGet(HttpCwsContext context)
{
var tieLineString = JsonConvert.SerializeObject(TieLineCollection.Default.Select((tl) => new

View file

@ -195,26 +195,32 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
}
/// <summary>
/// Configuration class for SetDeviceStreamDebugRequestHandler
/// </summary>
public class SetDeviceStreamDebugConfig
{
[JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)]
/// <summary>
/// Gets or sets the DeviceKey
/// </summary>
[JsonProperty("deviceKey", NullValueHandling = NullValueHandling.Include)]
public string DeviceKey { get; set; }
[JsonProperty("setting", NullValueHandling = NullValueHandling.Include)]
/// <summary>
/// Gets or sets the Setting
/// </summary>
[JsonProperty("setting", NullValueHandling = NullValueHandling.Include)]
public string Setting { get; set; }
[JsonProperty("timeout")]
/// <summary>
/// Gets or sets the Timeout
/// </summary>
[JsonProperty("timeout")]
public int Timeout { get; set; }
/// <summary>
/// Constructor
/// </summary>
public SetDeviceStreamDebugConfig()
{
DeviceKey = null;