Skip to content

Commit

Permalink
chore: Added StringComparer.Ordinal at all possible positions (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtrion authored Jan 5, 2024
1 parent ca2e441 commit a9f9af3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace NetEvolve.Http.Correlation;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -54,7 +55,10 @@ public async Task InvokeAsync(HttpContext context)
var accessor = context.RequestServices.GetService<IHttpCorrelationAccessor>()!;
accessor.HeaderName = usedHeaderName;

var scopeProperties = new Dictionary<string, object> { { usedHeaderName, correlationId } };
var scopeProperties = new Dictionary<string, object>(StringComparer.Ordinal)
{
{ usedHeaderName, correlationId }
};

using (_logger.BeginScope(scopeProperties))
{
Expand Down

0 comments on commit a9f9af3

Please sign in to comment.