Files
libremetaverse/LibreMetaverse.RLV/LockedFolder.cs
nooperation d905210ecf Initial commit of LibreMetaverse.RLV and LibreMetaverse.RLV.Tests.
This library provides RLV command processing and ease of use for checking current RLV permissions and restrictions
2025-08-17 19:55:33 -04:00

25 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
namespace LibreMetaverse.RLV
{
internal sealed class LockedFolder
{
internal LockedFolder(RlvSharedFolder folder)
{
Folder = folder ?? throw new ArgumentException("Folder cannot be null", nameof(folder));
}
public RlvSharedFolder Folder { get; }
public ICollection<RlvRestriction> DetachRestrictions { get; } = new List<RlvRestriction>();
public ICollection<RlvRestriction> AttachRestrictions { get; } = new List<RlvRestriction>();
public ICollection<RlvRestriction> DetachExceptions { get; } = new List<RlvRestriction>();
public ICollection<RlvRestriction> AttachExceptions { get; } = new List<RlvRestriction>();
public bool CanDetach => DetachExceptions.Count != 0 || DetachRestrictions.Count == 0;
public bool CanAttach => AttachExceptions.Count != 0 || AttachRestrictions.Count == 0;
public bool IsLocked => DetachRestrictions.Count != 0 || AttachRestrictions.Count != 0;
}
}