docs: add XML documentation to PepperDash.Core project

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:48:23 +00:00
parent eeb0e84dc7
commit 260677a37f
59 changed files with 1072 additions and 5 deletions

View File

@@ -35,6 +35,9 @@ namespace PepperDash.Core
return issuerCertificate;
}
/// <summary>
/// IssueCertificate method
/// </summary>
public X509Certificate2 IssueCertificate(string subjectName, X509Certificate2 issuerCertificate, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@@ -56,6 +59,9 @@ namespace PepperDash.Core
return ConvertCertificate(certificate, subjectKeyPair, random);
}
/// <summary>
/// CreateCertificateAuthorityCertificate method
/// </summary>
public X509Certificate2 CreateCertificateAuthorityCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@@ -78,6 +84,9 @@ namespace PepperDash.Core
return ConvertCertificate(certificate, subjectKeyPair, random);
}
/// <summary>
/// CreateSelfSignedCertificate method
/// </summary>
public X509Certificate2 CreateSelfSignedCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@@ -305,6 +314,9 @@ namespace PepperDash.Core
return convertedCertificate;
}
/// <summary>
/// WriteCertificate method
/// </summary>
public void WriteCertificate(X509Certificate2 certificate, string outputDirectory, string certName)
{
// This password is the one attached to the PFX file. Use 'null' for no password.
@@ -332,6 +344,9 @@ namespace PepperDash.Core
}
}
}
/// <summary>
/// AddCertToStore method
/// </summary>
public bool AddCertToStore(X509Certificate2 cert, System.Security.Cryptography.X509Certificates.StoreName st, System.Security.Cryptography.X509Certificates.StoreLocation sl)
{
bool bRet = false;

View File

@@ -5,6 +5,9 @@ namespace PepperDash.Core.Web.RequestHandlers
/// <summary>
/// Web API default request handler
/// </summary>
/// <summary>
/// Represents a DefaultRequestHandler
/// </summary>
public class DefaultRequestHandler : WebApiBaseRequestHandler
{
/// <summary>

View File

@@ -142,6 +142,9 @@ namespace PepperDash.Core.Web.RequestHandlers
/// Process request
/// </summary>
/// <param name="context"></param>
/// <summary>
/// ProcessRequest method
/// </summary>
public void ProcessRequest(HttpCwsContext context)
{
if (!_handlers.TryGetValue(context.Request.HttpMethod, out Func<HttpCwsContext, Task> handler))

View File

@@ -144,6 +144,9 @@ namespace PepperDash.Core.Web.RequestHandlers
/// Process request
/// </summary>
/// <param name="context"></param>
/// <summary>
/// ProcessRequest method
/// </summary>
public void ProcessRequest(HttpCwsContext context)
{
Action<HttpCwsContext> handler;

View File

@@ -28,21 +28,33 @@ namespace PepperDash.Core.Web
/// <summary>
/// Web API server key
/// </summary>
/// <summary>
/// Gets or sets the Key
/// </summary>
public string Key { get; private set; }
/// <summary>
/// Web API server name
/// </summary>
/// <summary>
/// Gets or sets the Name
/// </summary>
public string Name { get; private set; }
/// <summary>
/// CWS base path, will default to "/api" if not set via initialize method
/// </summary>
/// <summary>
/// Gets or sets the BasePath
/// </summary>
public string BasePath { get; private set; }
/// <summary>
/// Indicates CWS is registered with base path
/// </summary>
/// <summary>
/// Gets or sets the IsRegistered
/// </summary>
public bool IsRegistered { get; private set; }
/// <summary>
@@ -140,6 +152,9 @@ namespace PepperDash.Core.Web
/// <summary>
/// Initializes CWS class
/// </summary>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key, string basePath)
{
Key = key;
@@ -165,6 +180,9 @@ namespace PepperDash.Core.Web
/// Removes a route from CWS
/// </summary>
/// <param name="route"></param>
/// <summary>
/// RemoveRoute method
/// </summary>
public void RemoveRoute(HttpCwsRoute route)
{
if (route == null)
@@ -179,6 +197,9 @@ namespace PepperDash.Core.Web
/// <summary>
/// Returns a list of the current routes
/// </summary>
/// <summary>
/// GetRouteCollection method
/// </summary>
public HttpCwsRouteCollection GetRouteCollection()
{
return _server.Routes;
@@ -225,6 +246,9 @@ namespace PepperDash.Core.Web
/// <summary>
/// Stop CWS instance
/// </summary>
/// <summary>
/// Stop method
/// </summary>
public void Stop()
{
try