mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-14 04:05:41 +00:00
Validate not-null argument
This commit is contained in:
parent
002d53f003
commit
bb1fda7f9f
@ -12,8 +12,15 @@ namespace VpSharp.Entities;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
|
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)
|
protected internal VirtualParadiseObject(VirtualParadiseClient client, int id)
|
||||||
{
|
{
|
||||||
|
ArgumentNullException.ThrowIfNull(client);
|
||||||
Client = client;
|
Client = client;
|
||||||
Id = id;
|
Id = id;
|
||||||
}
|
}
|
||||||
@ -212,6 +219,7 @@ public abstract class VirtualParadiseObject : IEquatable<VirtualParadiseObject>
|
|||||||
|
|
||||||
protected internal virtual void ExtractFromOther(VirtualParadiseObject virtualParadiseObject)
|
protected internal virtual void ExtractFromOther(VirtualParadiseObject virtualParadiseObject)
|
||||||
{
|
{
|
||||||
|
ArgumentNullException.ThrowIfNull(virtualParadiseObject);
|
||||||
Location = virtualParadiseObject.Location;
|
Location = virtualParadiseObject.Location;
|
||||||
Owner = virtualParadiseObject.Owner;
|
Owner = virtualParadiseObject.Owner;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user