diff --git a/Notepad.Extensions.Logging/NotepadLogger.cs b/Notepad.Extensions.Logging/NotepadLogger.cs index a4f1dcf..c0a0d6c 100644 --- a/Notepad.Extensions.Logging/NotepadLogger.cs +++ b/Notepad.Extensions.Logging/NotepadLogger.cs @@ -7,11 +7,11 @@ namespace Microsoft.Extensions.Logging { class NotepadLogger : ILogger { - public NotepadLogger(ObjectPool stringBuilderPool, string categoryName, string windowName = null) + public NotepadLogger(ObjectPool stringBuilderPool, string categoryName, string windowName) { this.stringBuilderPool = stringBuilderPool; this.categoryName = categoryName; - this.windowName = windowName; + this.windowName = windowName ?? throw new ArgumentNullException("Window name cannot be null."); } readonly ObjectPool stringBuilderPool;