From af0d217d9e4188a29122af6b4a3d8bc448c97768 Mon Sep 17 00:00:00 2001 From: Thibaud Desodt Date: Mon, 16 Oct 2017 07:45:01 +0200 Subject: [PATCH] Get rid of HeuristicUnreachableCode warning --- test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs b/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs index 91c1da789..9b7e7f9fd 100644 --- a/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs +++ b/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs @@ -313,12 +313,14 @@ public void LoggingLevelSwitchCanBeUsedForMinimumLevelOverrides() systemLogger.Write(Some.WarningEvent()); Assert.False(evt is null, "LoggingLevelSwitch initial level was Warning for logger System.*. It should log Warning messages for SourceContext System.Bar"); + // ReSharper disable HeuristicUnreachableCode evt = null; var controlSwitch = DummyWithLevelSwitchSink.ControlLevelSwitch; controlSwitch.MinimumLevel = LogEventLevel.Information; systemLogger.Write(Some.InformationEvent()); Assert.False(evt is null, "LoggingLevelSwitch level was changed to Information for logger System.*. It should now log Information events for SourceContext System.Bar."); + // ReSharper restore HeuristicUnreachableCode } }