docs: enable XML documentation generation and add initial documentation

Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-22 15:44:52 +00:00
parent d282487da6
commit eeb0e84dc7
8 changed files with 33 additions and 13 deletions

View File

@@ -22,6 +22,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DocumentationFile>bin\$(Configuration)\PepperDash_Essentials_Core.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.21.90" />

View File

@@ -22,6 +22,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DocumentationFile>bin\$(Configuration)\Essentials Devices Common.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PepperDash.Core\PepperDash.Core.csproj" />

View File

@@ -22,6 +22,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineConstants>$(DefineConstants);SERIES4</DefineConstants>
<DocumentationFile>bin\$(Configuration)\mobile-control-messengers.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Messengers\SIMPLAtcMessenger.cs" />

View File

@@ -25,6 +25,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineConstants>TRACE;SERIES4</DefineConstants>
<DocumentationFile>bin\$(Configuration)\epi-essentials-mobile-control.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Remove="bin\**" />

View File

@@ -18,6 +18,9 @@ using PepperDash.Essentials.Core.Routing;
namespace PepperDash.Essentials
{
/// <summary>
/// Main control system class that inherits from CrestronControlSystem and manages program lifecycle
/// </summary>
public class ControlSystem : CrestronControlSystem, ILoadConfig
{
HttpLogoServer LogoServer;
@@ -26,6 +29,9 @@ namespace PepperDash.Essentials
private CEvent _initializeEvent;
private const long StartupTime = 500;
/// <summary>
/// Initializes a new instance of the ControlSystem class
/// </summary>
public ControlSystem()
: base()
{

View File

@@ -22,6 +22,9 @@ namespace PepperDash.Essentials
public class DeviceFactory
{
/// <summary>
/// Initializes a new instance of the DeviceFactory class and loads all device type factories
/// </summary>
public DeviceFactory()
{
var assy = Assembly.GetExecutingAssembly();

View File

@@ -9,28 +9,31 @@ using Serilog.Events;
namespace PepperDash.Essentials
{
/// <summary>
/// HTTP server for serving logo images and files
/// </summary>
public class HttpLogoServer
{
/// <summary>
///
/// The HTTP server instance
/// </summary>
readonly HttpServer _server;
/// <summary>
///
/// The directory containing files to serve
/// </summary>
readonly string _fileDirectory;
/// <summary>
///
/// Dictionary mapping file extensions to content types
/// </summary>
public static Dictionary<string, string> ExtensionContentTypes;
/// <summary>
///
/// Initializes a new instance of the HttpLogoServer class
/// </summary>
/// <param name="port"></param>
/// <param name="directory"></param>
/// <param name="port">Port number for the HTTP server</param>
/// <param name="directory">Directory containing files to serve</param>
public HttpLogoServer(int port, string directory)
{
ExtensionContentTypes = new Dictionary<string, string>
@@ -57,8 +60,10 @@ namespace PepperDash.Essentials
}
/// <summary>
///
/// Handles incoming HTTP requests and serves files from the configured directory
/// </summary>
/// <param name="sender">The HTTP server instance</param>
/// <param name="args">HTTP request arguments</param>
void Server_OnHttpRequest(object sender, OnHttpRequestArgs args)
{
var path = args.Request.Path;
@@ -102,8 +107,9 @@ namespace PepperDash.Essentials
}
/// <summary>
///
/// Handles program status events and closes the server when the program is stopping
/// </summary>
/// <param name="programEventType">The program status event type</param>
void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType)
{
if (programEventType == eProgramStatusEventType.Stopping)
@@ -111,10 +117,10 @@ namespace PepperDash.Essentials
}
/// <summary>
///
/// Gets the content type for a file based on its extension
/// </summary>
/// <param name="extension"></param>
/// <returns></returns>
/// <param name="extension">The file extension</param>
/// <returns>The corresponding content type string</returns>
public static string GetContentType(string extension)
{
var type = ExtensionContentTypes.ContainsKey(extension) ? ExtensionContentTypes[extension] : "text/plain";

View File

@@ -20,8 +20,9 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug 4.7.2|AnyCPU'">
<DebugType>full</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DocumentationFile>bin\$(Configuration)\PepperDashEssentials.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<None Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">