Improve XML documentation coverage across src modules and sync generated analysis artifacts.

This commit is contained in:
Joseph Doherty
2026-03-14 03:56:58 -04:00
parent ba0d65317a
commit 46ead5ea9f
152 changed files with 2821 additions and 11284 deletions
@@ -19,6 +19,7 @@ public static class ConfigProcessor
/// <summary>
/// Parses a configuration file and returns the populated options.
/// </summary>
/// <param name="filePath">Absolute or relative path to the NATS configuration file to load.</param>
public static NatsOptions ProcessConfigFile(string filePath)
{
var config = NatsConfParser.ParseFile(filePath);
@@ -30,6 +31,7 @@ public static class ConfigProcessor
/// <summary>
/// Parses configuration text (not from a file) and returns the populated options.
/// </summary>
/// <param name="configText">Raw configuration text in NATS server config format.</param>
public static NatsOptions ProcessConfig(string configText)
{
var config = NatsConfParser.Parse(configText);
@@ -42,6 +44,8 @@ public static class ConfigProcessor
/// Applies a parsed configuration dictionary to existing options.
/// Throws <see cref="ConfigProcessorException"/> if any validation errors are collected.
/// </summary>
/// <param name="config">Parsed config tree keyed by top-level field names.</param>
/// <param name="opts">Options instance that receives normalized values from the parsed config.</param>
public static void ApplyConfig(Dictionary<string, object?> config, NatsOptions opts)
{
var errors = new List<string>();
@@ -423,6 +427,7 @@ public static class ConfigProcessor
/// <item>A number (long/double) treated as seconds</item>
/// </list>
/// </summary>
/// <param name="value">Raw duration token from configuration (string or numeric seconds).</param>
internal static TimeSpan ParseDuration(object? value)
{
return value switch
@@ -1877,7 +1882,14 @@ public static class ConfigProcessor
public sealed class ConfigProcessorException(string message, List<string> errors, List<string>? warnings = null)
: Exception(message)
{
/// <summary>
/// Gets the list of blocking configuration errors that prevented startup.
/// </summary>
public IReadOnlyList<string> Errors => errors;
/// <summary>
/// Gets non-fatal configuration warnings collected during processing.
/// </summary>
public IReadOnlyList<string> Warnings => warnings ?? [];
}
@@ -1887,6 +1899,9 @@ public sealed class ConfigProcessorException(string message, List<string> errors
/// </summary>
public class ConfigWarningException(string message, string? source = null) : Exception(message)
{
/// <summary>
/// Gets the location within the source config where this warning originated, when available.
/// </summary>
public string? SourceLocation { get; } = source;
}
@@ -1897,5 +1912,8 @@ public class ConfigWarningException(string message, string? source = null) : Exc
public sealed class UnknownConfigFieldWarning(string field, string? source = null)
: ConfigWarningException($"unknown field {field}", source)
{
/// <summary>
/// Gets the unknown top-level or nested field name encountered in the configuration file.
/// </summary>
public string Field { get; } = field;
}