Skip to content

Commit

Permalink
pr-fix: update http correlation ctor to require options nonethless
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels committed Apr 11, 2023
1 parent 74f587e commit 194c51b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Arcus.WebApi.Logging.Core/Correlation/HttpCorrelation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ public HttpCorrelation(
IHttpContextAccessor httpContextAccessor,
IHttpCorrelationInfoAccessor correlationInfoAccessor,
ILogger<HttpCorrelation> logger)
: base(options?.Value ?? new HttpCorrelationInfoOptions(), correlationInfoAccessor, logger)
: base(options?.Value, correlationInfoAccessor, logger)
{
Guard.NotNull(httpContextAccessor, nameof(httpContextAccessor), "Requires a HTTP context accessor to get the current HTTP context");
Guard.NotNull(correlationInfoAccessor, nameof(correlationInfoAccessor), "Requires a correlation info instance to set and retrieve the correlation information");

options ??= Options.Create(new HttpCorrelationInfoOptions());
Guard.NotNull(options, nameof(options), "Requires a value in the set of options to configure the correlation process");
Guard.NotNull(options.Value, nameof(options), "Requires a value in the set of options to configure the correlation process");

Expand Down

0 comments on commit 194c51b

Please sign in to comment.