Files
libremetaverse/LibreMetaverse.RLV/AttachmentRequest.cs
nooperation 44103df8c1 Combined 'TryGetSharedFolderAsync' and 'TryGetCurrentOutfitAsync' and the creation of an inventory map into 'TryGetInventoryMapAsync'
Easier to differentiate between items in the shared #RLV folder and attached items that are not in the shared folder
Minor internal refactoring
Updated tests
2025-08-21 04:58:45 -04:00

35 lines
1.1 KiB
C#

using System;
namespace LibreMetaverse.RLV
{
/// <summary>
/// Represents a request to attach an item to the avatar
/// </summary>
public class AttachmentRequest
{
public Guid ItemId { get; }
public RlvAttachmentPoint AttachmentPoint { get; }
public bool ReplaceExistingAttachments { get; }
public AttachmentRequest(Guid itemId, RlvAttachmentPoint attachmentPoint, bool replaceExistingAttachments)
{
ItemId = itemId;
AttachmentPoint = attachmentPoint;
ReplaceExistingAttachments = replaceExistingAttachments;
}
public override bool Equals(object obj)
{
return obj is AttachmentRequest request &&
ItemId.Equals(request.ItemId) &&
AttachmentPoint == request.AttachmentPoint &&
ReplaceExistingAttachments == request.ReplaceExistingAttachments;
}
public override int GetHashCode()
{
return HashCode.Combine(ItemId, AttachmentPoint, ReplaceExistingAttachments);
}
}
}