From 55512d6c8dfdbff4f20ec02fdcc33d9d9bbbd309 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Tue, 29 Nov 2022 15:13:59 +0000 Subject: [PATCH] throw on null client --- VpSharp.Commands/CommandsExtension.cs | 4 +++- .../src/ClientExtensions/VirtualParadiseClientExtension.cs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VpSharp.Commands/CommandsExtension.cs b/VpSharp.Commands/CommandsExtension.cs index e59597d..1d799e9 100644 --- a/VpSharp.Commands/CommandsExtension.cs +++ b/VpSharp.Commands/CommandsExtension.cs @@ -22,7 +22,9 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension /// /// The owning client. /// The configuration to use. - /// is . + /// + /// or is . + /// public CommandsExtension(VirtualParadiseClient client, CommandsExtensionConfiguration configuration) : base(client) { diff --git a/VpSharp/src/ClientExtensions/VirtualParadiseClientExtension.cs b/VpSharp/src/ClientExtensions/VirtualParadiseClientExtension.cs index 20c4d76..8b0d6ab 100644 --- a/VpSharp/src/ClientExtensions/VirtualParadiseClientExtension.cs +++ b/VpSharp/src/ClientExtensions/VirtualParadiseClientExtension.cs @@ -11,9 +11,10 @@ public abstract class VirtualParadiseClientExtension /// Initializes a new instance of the class. /// /// The owning client. + /// is . protected VirtualParadiseClientExtension(VirtualParadiseClient client) { - Client = client; + Client = client ?? throw new ArgumentNullException(nameof(client)); } ///