Rename Object properties to more specific names

This avoids problems with the type name Object, which is a keyword in VB and other languages
This commit is contained in:
Oliver Booth 2022-11-29 23:59:26 +00:00
parent 32bb9d92bb
commit 0d0ce72cb2
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
5 changed files with 28 additions and 28 deletions

View File

@ -11,12 +11,12 @@ public sealed class ObjectBumpEventArgs : EventArgs
/// Initializes a new instance of the <see cref="ObjectBumpEventArgs" /> class.
/// </summary>
/// <param name="avatar">The avatar.</param>
/// <param name="virtualParadiseObject">The object.</param>
/// <param name="bumpedObject">The bumped object.</param>
/// <param name="phase">The bump phase.</param>
public ObjectBumpEventArgs(VirtualParadiseAvatar avatar, VirtualParadiseObject virtualParadiseObject, BumpPhase phase)
public ObjectBumpEventArgs(VirtualParadiseAvatar avatar, VirtualParadiseObject bumpedObject, BumpPhase phase)
{
Avatar = avatar;
Object = virtualParadiseObject;
BumpedObject = bumpedObject;
Phase = phase;
}
@ -30,7 +30,7 @@ public sealed class ObjectBumpEventArgs : EventArgs
/// Gets the object to which this event pertains.
/// </summary>
/// <value>The object to which this event pertains.</value>
public VirtualParadiseObject Object { get; }
public VirtualParadiseObject BumpedObject { get; }
/// <summary>
/// Gets the bump phase.

View File

@ -12,14 +12,14 @@ public sealed class ObjectChangedEventArgs : EventArgs
/// </summary>
/// <param name="avatar">The avatar which changed the object.</param>
/// <param name="objectBefore">The state of the object prior to the change.</param>
/// <param name="virtualParadiseObject">The object which was changed, containing updated values.</param>
/// <param name="objectAfter">The object which was changed, containing updated values.</param>
public ObjectChangedEventArgs(
VirtualParadiseAvatar avatar,
VirtualParadiseObject objectBefore,
VirtualParadiseObject virtualParadiseObject)
VirtualParadiseObject? objectBefore,
VirtualParadiseObject objectAfter)
{
Avatar = avatar;
Object = virtualParadiseObject;
ObjectAfter = objectAfter;
ObjectBefore = objectBefore;
}
@ -34,7 +34,7 @@ public sealed class ObjectChangedEventArgs : EventArgs
/// </summary>
/// <value>The object which was changed.</value>
/// <remarks>This instance will contain the updated values of the object.</remarks>
public VirtualParadiseObject Object { get; }
public VirtualParadiseObject ObjectAfter { get; }
/// <summary>
/// Gets the state of the object prior to the change.
@ -43,5 +43,5 @@ public sealed class ObjectChangedEventArgs : EventArgs
/// The state of the object prior to the change. This value may be <see langword="null" /> if the client did not
/// previously have the object cached.
/// </value>
public VirtualParadiseObject ObjectBefore { get; }
public VirtualParadiseObject? ObjectBefore { get; }
}

View File

@ -11,15 +11,15 @@ public sealed class ObjectClickedEventArgs : EventArgs
/// Initializes a new instance of the <see cref="ObjectClickedEventArgs" /> class.
/// </summary>
/// <param name="avatar">The avatar responsible for the click.</param>
/// <param name="virtualParadiseObject">The clicked object.</param>
/// <param name="clickedObject">The clicked object.</param>
/// <param name="clickPoint">The click point.</param>
public ObjectClickedEventArgs(
VirtualParadiseAvatar avatar,
VirtualParadiseObject virtualParadiseObject,
VirtualParadiseObject clickedObject,
Vector3d clickPoint)
{
Avatar = avatar;
Object = virtualParadiseObject;
ClickedObject = clickedObject;
ClickPoint = clickPoint;
}
@ -29,15 +29,15 @@ public sealed class ObjectClickedEventArgs : EventArgs
/// <value>The avatar responsible for the click.</value>
public VirtualParadiseAvatar Avatar { get; }
/// <summary>
/// Gets the clicked object.
/// </summary>
/// <value>The clicked object.</value>
public VirtualParadiseObject ClickedObject { get; }
/// <summary>
/// Gets the point at which the avatar clicked the object.
/// </summary>
/// <value>The click point.</value>
public Vector3d ClickPoint { get; }
/// <summary>
/// Gets the clicked object.
/// </summary>
/// <value>The clicked object.</value>
public VirtualParadiseObject Object { get; }
}

View File

@ -11,11 +11,11 @@ public sealed class ObjectCreatedEventArgs : EventArgs
/// Initializes a new instance of the <see cref="ObjectClickedEventArgs" /> class.
/// </summary>
/// <param name="avatar">The avatar responsible for the object being created.</param>
/// <param name="virtualParadiseObject">The created object.</param>
public ObjectCreatedEventArgs(VirtualParadiseAvatar avatar, VirtualParadiseObject virtualParadiseObject)
/// <param name="createdObject">The created object.</param>
public ObjectCreatedEventArgs(VirtualParadiseAvatar avatar, VirtualParadiseObject createdObject)
{
Avatar = avatar;
Object = virtualParadiseObject;
CreatedObject = createdObject;
}
/// <summary>
@ -28,5 +28,5 @@ public sealed class ObjectCreatedEventArgs : EventArgs
/// Gets the object which was created.
/// </summary>
/// <value>The object which was created.</value>
public VirtualParadiseObject Object { get; }
public VirtualParadiseObject CreatedObject { get; }
}

View File

@ -12,12 +12,12 @@ public sealed class ObjectDeletedEventArgs : EventArgs
/// </summary>
/// <param name="avatar">The avatar responsible for the object being deleted.</param>
/// <param name="objectId">The ID of the deleted object.</param>
/// <param name="virtualParadiseObject">The deleted object.</param>
public ObjectDeletedEventArgs(VirtualParadiseAvatar avatar, int objectId, VirtualParadiseObject virtualParadiseObject)
/// <param name="deletedObject">The deleted object.</param>
public ObjectDeletedEventArgs(VirtualParadiseAvatar avatar, int objectId, VirtualParadiseObject deletedObject)
{
Avatar = avatar;
ObjectId = objectId;
Object = virtualParadiseObject;
DeletedObject = deletedObject;
}
/// <summary>
@ -35,7 +35,7 @@ public sealed class ObjectDeletedEventArgs : EventArgs
/// <see cref="ObjectId" /> will always be assigned.
/// </remarks>
/// <seealso cref="ObjectId" />
public VirtualParadiseObject Object { get; }
public VirtualParadiseObject DeletedObject { get; }
/// <summary>
/// Gets the ID of the object which was deleted.
@ -44,6 +44,6 @@ public sealed class ObjectDeletedEventArgs : EventArgs
/// <remarks>
/// This value will always be assigned, regardless of whether or not the client had previously cached the object.
/// </remarks>
/// <seealso cref="Object" />
/// <seealso cref="DeletedObject" />
public int ObjectId { get; }
}