1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-22 19:38:47 +00:00

throw on null client

This commit is contained in:
Oliver Booth 2022-11-29 15:13:59 +00:00
parent 027ce96ed3
commit 55512d6c8d
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
2 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,9 @@ public sealed class CommandsExtension : VirtualParadiseClientExtension
/// </summary> /// </summary>
/// <param name="client">The owning client.</param> /// <param name="client">The owning client.</param>
/// <param name="configuration">The configuration to use.</param> /// <param name="configuration">The configuration to use.</param>
/// <exception cref="ArgumentNullException"><paramref name="configuration" /> is <see langword="null" />.</exception> /// <exception cref="ArgumentNullException">
/// <paramref name="client" /> or <paramref name="configuration" /> is <see langword="null" />.
/// </exception>
public CommandsExtension(VirtualParadiseClient client, CommandsExtensionConfiguration configuration) public CommandsExtension(VirtualParadiseClient client, CommandsExtensionConfiguration configuration)
: base(client) : base(client)
{ {

View File

@ -11,9 +11,10 @@ public abstract class VirtualParadiseClientExtension
/// Initializes a new instance of the <see cref="VirtualParadiseClientExtension" /> class. /// Initializes a new instance of the <see cref="VirtualParadiseClientExtension" /> class.
/// </summary> /// </summary>
/// <param name="client">The owning client.</param> /// <param name="client">The owning client.</param>
/// <exception cref="ArgumentNullException"><paramref name="client" /> is <see langword="null" />.</exception>
protected VirtualParadiseClientExtension(VirtualParadiseClient client) protected VirtualParadiseClientExtension(VirtualParadiseClient client)
{ {
Client = client; Client = client ?? throw new ArgumentNullException(nameof(client));
} }
/// <summary> /// <summary>