File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/Serilog.Sinks.Console/Sinks/SystemConsole/Themes Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ public class AnsiConsoleTheme : ConsoleTheme
5050 /// <exception cref="ArgumentNullException">When <paramref name="styles"/> is <code>null</code></exception>
5151 public AnsiConsoleTheme ( IReadOnlyDictionary < ConsoleThemeStyle , string > styles )
5252 {
53- _styles = styles ? . ToDictionary ( kv => kv . Key , kv => kv . Value ) ?? throw new ArgumentNullException ( nameof ( styles ) ) ;
53+ if ( styles == null ) throw new ArgumentNullException ( nameof ( styles ) ) ;
54+ _styles = styles . ToDictionary ( kv => kv . Key , kv => kv . Value ) ;
5455 }
5556
5657 /// <inheritdoc/>
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ public class SystemConsoleTheme : ConsoleTheme
4747 /// <exception cref="ArgumentNullException">When <paramref name="styles"/> is <code>null</code></exception>
4848 public SystemConsoleTheme ( IReadOnlyDictionary < ConsoleThemeStyle , SystemConsoleThemeStyle > styles )
4949 {
50- Styles = styles ? . ToDictionary ( kv => kv . Key , kv => kv . Value ) ?? throw new ArgumentNullException ( nameof ( styles ) ) ;
50+ if ( styles == null ) throw new ArgumentNullException ( nameof ( styles ) ) ;
51+ Styles = styles . ToDictionary ( kv => kv . Key , kv => kv . Value ) ;
5152 }
5253
5354 /// <inheritdoc/>
You can’t perform that action at this time.
0 commit comments