From ed95e98a27efbbc1815ee3a88aafca8936bac7fe Mon Sep 17 00:00:00 2001 From: Alexander Kislitsyn <4lex.kislitsyn@gmail.com> Date: Thu, 21 May 2020 18:52:06 +0300 Subject: [PATCH] Removed default value and added exception. --- Notepad.Extensions.Logging/NotepadLogger.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;