File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1313
1414namespace DebugProbe . AspNetCore . Extensions ;
1515
16+ /// <summary>
17+ /// Extension methods for configuring DebugProbe.
18+ /// </summary>
1619public 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}
Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff line change 11namespace DebugProbe . AspNetCore . Options ;
22
3+ /// <summary>
4+ /// Configuration options for DebugProbe.
5+ /// </summary>
36public 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}
Original file line number Diff line number Diff line change 99namespace 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>
1414public 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 ;
You can’t perform that action at this time.
0 commit comments