Skip to content

Commit 9e188c5

Browse files
committed
Add more XML Documentation
1 parent eafe7d5 commit 9e188c5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/Serilog.Sinks.Console/ConsoleLoggerConfigurationExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public static class ConsoleLoggerConfigurationExtensions
5050
/// uses <see cref="SystemConsoleTheme.Literate"/>.</param>
5151
/// <param name="applyThemeToRedirectedOutput">Applies the selected or default theme even when output redirection is detected.</param>
5252
/// <returns>Configuration object allowing method chaining.</returns>
53+
/// <exception cref="ArgumentNullException">When <paramref name="sinkConfiguration"/> is <code>null</code></exception>
54+
/// <exception cref="ArgumentNullException">When <paramref name="outputTemplate"/> is <code>null</code></exception>
5355
public static LoggerConfiguration Console(
5456
this LoggerSinkConfiguration sinkConfiguration,
5557
LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum,
@@ -89,6 +91,8 @@ public static LoggerConfiguration Console(
8991
/// to be changed at runtime.</param>
9092
/// <param name="standardErrorFromLevel">Specifies the level at which events will be written to standard error.</param>
9193
/// <returns>Configuration object allowing method chaining.</returns>
94+
/// <exception cref="ArgumentNullException">When <paramref name="sinkConfiguration"/> is <code>null</code></exception>
95+
/// <exception cref="ArgumentNullException">When <paramref name="formatter"/> is <code>null</code></exception>
9296
public static LoggerConfiguration Console(
9397
this LoggerSinkConfiguration sinkConfiguration,
9498
ITextFormatter formatter,

src/Serilog.Sinks.Console/Sinks/SystemConsole/Themes/AnsiConsoleTheme.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public class AnsiConsoleTheme : ConsoleTheme
4747
/// Construct a theme given a set of styles.
4848
/// </summary>
4949
/// <param name="styles">Styles to apply within the theme.</param>
50+
/// <exception cref="ArgumentNullException">When <paramref name="styles"/> is <code>null</code></exception>
5051
public AnsiConsoleTheme(IReadOnlyDictionary<ConsoleThemeStyle, string> styles)
5152
{
52-
if (styles == null) throw new ArgumentNullException(nameof(styles));
53-
_styles = styles.ToDictionary(kv => kv.Key, kv => kv.Value);
53+
_styles = styles?.ToDictionary(kv => kv.Key, kv => kv.Value) ?? throw new ArgumentNullException(nameof(styles));
5454
}
5555

5656
/// <inheritdoc/>

src/Serilog.Sinks.Console/Sinks/SystemConsole/Themes/SystemConsoleTheme.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public class SystemConsoleTheme : ConsoleTheme
4444
/// Construct a theme given a set of styles.
4545
/// </summary>
4646
/// <param name="styles">Styles to apply within the theme.</param>
47+
/// <exception cref="ArgumentNullException">When <paramref name="styles"/> is <code>null</code></exception>
4748
public SystemConsoleTheme(IReadOnlyDictionary<ConsoleThemeStyle, SystemConsoleThemeStyle> styles)
4849
{
49-
if (styles == null) throw new ArgumentNullException(nameof(styles));
50-
Styles = styles.ToDictionary(kv => kv.Key, kv => kv.Value);
50+
Styles = styles?.ToDictionary(kv => kv.Key, kv => kv.Value) ?? throw new ArgumentNullException(nameof(styles));
5151
}
5252

5353
/// <inheritdoc/>

0 commit comments

Comments
 (0)