Skip to content

Commit bce70ef

Browse files
chore: add XML documentation for public APIs
Adds XML documentation comments for the main public DebugProbe to improve IntelliSense and package usability for consumers.
2 parents b8c87b8 + 84ba3f4 commit bce70ef

5 files changed

Lines changed: 37 additions & 8 deletions

File tree

DebugProbe.AspNetCore/DebugProbe.AspNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7-
87
<GenerateDocumentationFile>true</GenerateDocumentationFile>
8+
<NoWarn>1591</NoWarn>
99

1010
<PackageId>DebugProbe.AspNetCore</PackageId>
1111
<Version>1.4.1-preview.2</Version>

DebugProbe.AspNetCore/Extensions/DebugProbeExtensions.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@
1313

1414
namespace DebugProbe.AspNetCore.Extensions;
1515

16+
/// <summary>
17+
/// Extension methods for configuring DebugProbe.
18+
/// </summary>
1619
public static class DebugProbeExtensions
1720
{
1821
private static readonly HttpClient Http = new()
1922
{
2023
Timeout = TimeSpan.FromSeconds(5)
2124
};
2225

23-
public static IServiceCollection AddDebugProbe(
24-
this IServiceCollection services,
25-
Action<DebugProbeOptions>? configure = null)
26+
/// <summary>
27+
/// Enables the DebugProbe middleware and dashboard.
28+
/// </summary>
29+
public static IServiceCollection AddDebugProbe(this IServiceCollection services, Action<DebugProbeOptions>? configure = null)
2630
{
2731
var options = new DebugProbeOptions();
2832
configure?.Invoke(options);
@@ -33,6 +37,9 @@ public static IServiceCollection AddDebugProbe(
3337
return services;
3438
}
3539

40+
/// <summary>
41+
/// Registers DebugProbe services.
42+
/// </summary>
3643
public static IApplicationBuilder UseDebugProbe(this IApplicationBuilder app)
3744
{
3845
app.UseMiddleware<DebugProbeMiddleware>();
@@ -188,6 +195,4 @@ public static IApplicationBuilder UseDebugProbe(this IApplicationBuilder app)
188195

189196
return app;
190197
}
191-
192-
193198
}

DebugProbe.AspNetCore/Middleware/DebugProbeMiddleware.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,18 @@ public class DebugProbeMiddleware
4343
private readonly RequestDelegate _next;
4444
private readonly DebugProbeOptions _options;
4545

46+
/// <summary>
47+
/// Initializes a new instance of the middleware.
48+
/// </summary>
4649
public DebugProbeMiddleware(RequestDelegate next, DebugProbeOptions options)
4750
{
4851
_next = next;
4952
_options = options;
5053
}
5154

55+
/// <summary>
56+
/// Processes the current HTTP request.
57+
/// </summary>
5258
public async Task Invoke(HttpContext context, DebugEntryStore store)
5359
{
5460
var path = context.Request.Path.Value ?? string.Empty;
Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
namespace DebugProbe.AspNetCore.Options;
22

3+
/// <summary>
4+
/// Configuration options for DebugProbe.
5+
/// </summary>
36
public class DebugProbeOptions
47
{
8+
/// <summary>
9+
/// Maximum number of stored entries.
10+
/// </summary>
511
public int MaxEntries { get; set; } = 20;
612

13+
/// <summary>
14+
/// Maximum captured request or response body size in kilobytes.
15+
/// </summary>
716
public int MaxBodyCaptureSizeKb { get; set; } = 256;
817

18+
/// <summary>
19+
/// Allows compare requests to local or private network targets.
20+
/// </summary>
921
public bool AllowLocalCompareTargets { get; set; }
1022

23+
/// <summary>
24+
/// Additional request paths to ignore.
25+
/// </summary>
1126
public string[] IgnorePaths { get; set; } = [];
12-
1327
}

DebugProbe.AspNetCore/Storage/DebugEntryStore.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@
99
namespace DebugProbe.AspNetCore.Storage;
1010

1111
/// <summary>
12-
/// In-memory store for DebugEntry instances with a configurable size limit.
12+
/// Stores captured DebugProbe entries in memory.
1313
/// </summary>
1414
public class DebugEntryStore
1515
{
16+
/// <summary>
17+
/// Gets environment information for the current application.
18+
/// </summary>
1619
public DebugEnvironment Environment { get; }
1720

1821
private readonly ConcurrentQueue<DebugEntry> _queue = new();
1922
private readonly int _limit;
2023

24+
2125
public DebugEntryStore(DebugProbeOptions options)
2226
{
2327
_limit = options.MaxEntries;

0 commit comments

Comments
 (0)