diff --git a/src/Serilog.Enrichers.CorrelationId.Tests/Support/DelegateSink.cs b/src/Serilog.Enrichers.CorrelationId.Tests/Support/DelegateSink.cs index 73e4ddf..14177fc 100644 --- a/src/Serilog.Enrichers.CorrelationId.Tests/Support/DelegateSink.cs +++ b/src/Serilog.Enrichers.CorrelationId.Tests/Support/DelegateSink.cs @@ -12,7 +12,8 @@ public class DelegatingSink : ILogEventSink public DelegatingSink(Action write) { - _write = write ?? throw new ArgumentNullException(nameof(write)); + if (write == null) throw new ArgumentNullException(nameof(write)); + _write = write; } public void Emit(LogEvent logEvent) @@ -32,4 +33,4 @@ public static LogEvent GetLogEvent(Action writeAction) } } } -} \ No newline at end of file +}