From 7b4cbb29eaeec328338bffece460fafff7bfeb1a Mon Sep 17 00:00:00 2001 From: Steven Atkinson Date: Wed, 12 Apr 2017 12:43:10 +0100 Subject: [PATCH] Fixed unsupported syntax. --- .../Support/DelegateSink.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 +}