mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-22 14:08:49 +00:00
Validate not-null argument
This commit is contained in:
parent
002d53f003
commit
bb1fda7f9f
@ -12,8 +12,15 @@ namespace VpSharp.Entities;
|
||||
/// </summary>
|
||||
public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VirtualParadiseObject" /> class.
|
||||
/// </summary>
|
||||
/// <param name="client">The owning client.</param>
|
||||
/// <param name="id">The object ID.</param>
|
||||
/// <exception cref="ArgumentNullException"><paramref name="client" /> is <see langword="null" />.</exception>
|
||||
protected internal VirtualParadiseObject(VirtualParadiseClient client, int id)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(client);
|
||||
Client = client;
|
||||
Id = id;
|
||||
}
|
||||
@ -212,6 +219,7 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
|
||||
|
||||
protected internal virtual void ExtractFromOther(VirtualParadiseObject virtualParadiseObject)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(virtualParadiseObject);
|
||||
Location = virtualParadiseObject.Location;
|
||||
Owner = virtualParadiseObject.Owner;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user