Skip to content

Commit 91c6e59

Browse files
committed
fixed CLI warning
1 parent 60b668a commit 91c6e59

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/BuildingBlocks/Web/Observability/Logging/Serilog/HttpRequestContextEnricher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
2020
// Add properties to the log event based on HttpContext
2121
logEvent.AddPropertyIfAbsent(propertyFactory.CreateProperty("RequestMethod", httpContext.Request.Method));
2222
logEvent.AddPropertyIfAbsent(propertyFactory.CreateProperty("RequestPath", httpContext.Request.Path));
23-
logEvent.AddPropertyIfAbsent(propertyFactory.CreateProperty("UserAgent", httpContext.Request.Headers["User-Agent"]));
23+
logEvent.AddPropertyIfAbsent(propertyFactory.CreateProperty("UserAgent", httpContext.Request.Headers.UserAgent));
2424

2525
if (httpContext.User?.Identity?.IsAuthenticated == true)
2626
{

src/Tools/CLI/Scaffolding/TemplateRenderer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ namespace FSH.CLI.Scaffolding;
77
/// Renders templates with variable substitution
88
/// </summary>
99
[SuppressMessage("Globalization", "CA1308:Normalize strings to uppercase", Justification = "Lowercase is required for Docker, Terraform, and GitHub Actions naming conventions")]
10-
internal sealed class TemplateRenderer(ITemplateLoader templateLoader, ITemplateParser templateParser, ITemplateCache templateCache) : ITemplateRenderer
10+
internal sealed class TemplateRenderer(ITemplateLoader templateLoader, ITemplateParser templateParser /*, ITemplateCache templateCache*/) : ITemplateRenderer
1111
{
1212
private readonly ITemplateLoader _templateLoader = templateLoader ?? throw new ArgumentNullException(nameof(templateLoader));
1313
private readonly ITemplateParser _templateParser = templateParser ?? throw new ArgumentNullException(nameof(templateParser));
14-
private readonly ITemplateCache _templateCache = templateCache ?? throw new ArgumentNullException(nameof(templateCache));
14+
// private readonly ITemplateCache _templateCache = templateCache ?? throw new ArgumentNullException(nameof(templateCache));
1515

1616
#region Solution and Project Templates
1717

0 commit comments

Comments
 (0)