1
0
mirror of https://github.com/oliverbooth/VpSharp synced 2024-11-23 00:28:48 +00:00

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

View File

@ -12,14 +12,14 @@ public sealed class ObjectChangedEventArgs : EventArgs
/// </summary> /// </summary>
/// <param name="avatar">The avatar which changed the object.</param> /// <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="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( public ObjectChangedEventArgs(
VirtualParadiseAvatar avatar, VirtualParadiseAvatar avatar,
VirtualParadiseObject objectBefore, VirtualParadiseObject? objectBefore,
VirtualParadiseObject virtualParadiseObject) VirtualParadiseObject objectAfter)
{ {
Avatar = avatar; Avatar = avatar;
Object = virtualParadiseObject; ObjectAfter = objectAfter;
ObjectBefore = objectBefore; ObjectBefore = objectBefore;
} }
@ -34,7 +34,7 @@ public sealed class ObjectChangedEventArgs : EventArgs
/// </summary> /// </summary>
/// <value>The object which was changed.</value> /// <value>The object which was changed.</value>
/// <remarks>This instance will contain the updated values of the object.</remarks> /// <remarks>This instance will contain the updated values of the object.</remarks>
public VirtualParadiseObject Object { get; } public VirtualParadiseObject ObjectAfter { get; }
/// <summary> /// <summary>
/// Gets the state of the object prior to the change. /// 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 /// 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. /// previously have the object cached.
/// </value> /// </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. /// Initializes a new instance of the <see cref="ObjectClickedEventArgs" /> class.
/// </summary> /// </summary>
/// <param name="avatar">The avatar responsible for the click.</param> /// <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> /// <param name="clickPoint">The click point.</param>
public ObjectClickedEventArgs( public ObjectClickedEventArgs(
VirtualParadiseAvatar avatar, VirtualParadiseAvatar avatar,
VirtualParadiseObject virtualParadiseObject, VirtualParadiseObject clickedObject,
Vector3d clickPoint) Vector3d clickPoint)
{ {
Avatar = avatar; Avatar = avatar;
Object = virtualParadiseObject; ClickedObject = clickedObject;
ClickPoint = clickPoint; ClickPoint = clickPoint;
} }
@ -29,15 +29,15 @@ public sealed class ObjectClickedEventArgs : EventArgs
/// <value>The avatar responsible for the click.</value> /// <value>The avatar responsible for the click.</value>
public VirtualParadiseAvatar Avatar { get; } public VirtualParadiseAvatar Avatar { get; }
/// <summary>
/// Gets the clicked object.
/// </summary>
/// <value>The clicked object.</value>
public VirtualParadiseObject ClickedObject { get; }
/// <summary> /// <summary>
/// Gets the point at which the avatar clicked the object. /// Gets the point at which the avatar clicked the object.
/// </summary> /// </summary>
/// <value>The click point.</value> /// <value>The click point.</value>
public Vector3d ClickPoint { get; } 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. /// Initializes a new instance of the <see cref="ObjectClickedEventArgs" /> class.
/// </summary> /// </summary>
/// <param name="avatar">The avatar responsible for the object being created.</param> /// <param name="avatar">The avatar responsible for the object being created.</param>
/// <param name="virtualParadiseObject">The created object.</param> /// <param name="createdObject">The created object.</param>
public ObjectCreatedEventArgs(VirtualParadiseAvatar avatar, VirtualParadiseObject virtualParadiseObject) public ObjectCreatedEventArgs(VirtualParadiseAvatar avatar, VirtualParadiseObject createdObject)
{ {
Avatar = avatar; Avatar = avatar;
Object = virtualParadiseObject; CreatedObject = createdObject;
} }
/// <summary> /// <summary>
@ -28,5 +28,5 @@ public sealed class ObjectCreatedEventArgs : EventArgs
/// Gets the object which was created. /// Gets the object which was created.
/// </summary> /// </summary>
/// <value>The object which was created.</value> /// <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> /// </summary>
/// <param name="avatar">The avatar responsible for the object being deleted.</param> /// <param name="avatar">The avatar responsible for the object being deleted.</param>
/// <param name="objectId">The ID of the deleted object.</param> /// <param name="objectId">The ID of the deleted object.</param>
/// <param name="virtualParadiseObject">The deleted object.</param> /// <param name="deletedObject">The deleted object.</param>
public ObjectDeletedEventArgs(VirtualParadiseAvatar avatar, int objectId, VirtualParadiseObject virtualParadiseObject) public ObjectDeletedEventArgs(VirtualParadiseAvatar avatar, int objectId, VirtualParadiseObject deletedObject)
{ {
Avatar = avatar; Avatar = avatar;
ObjectId = objectId; ObjectId = objectId;
Object = virtualParadiseObject; DeletedObject = deletedObject;
} }
/// <summary> /// <summary>
@ -35,7 +35,7 @@ public sealed class ObjectDeletedEventArgs : EventArgs
/// <see cref="ObjectId" /> will always be assigned. /// <see cref="ObjectId" /> will always be assigned.
/// </remarks> /// </remarks>
/// <seealso cref="ObjectId" /> /// <seealso cref="ObjectId" />
public VirtualParadiseObject Object { get; } public VirtualParadiseObject DeletedObject { get; }
/// <summary> /// <summary>
/// Gets the ID of the object which was deleted. /// Gets the ID of the object which was deleted.
@ -44,6 +44,6 @@ public sealed class ObjectDeletedEventArgs : EventArgs
/// <remarks> /// <remarks>
/// This value will always be assigned, regardless of whether or not the client had previously cached the object. /// This value will always be assigned, regardless of whether or not the client had previously cached the object.
/// </remarks> /// </remarks>
/// <seealso cref="Object" /> /// <seealso cref="DeletedObject" />
public int ObjectId { get; } public int ObjectId { get; }
} }