Files
XericUIActionVessel/Runtime/InterfaceAttributeReflectionGenerator/Scripts/Attribute/XuiavrgCollectionCheckAttribute.cs
T
lrss3 5f93152c9b 添加了更多的反射检查逻辑。
修复布局组件的缓存引用关系
2026-04-28 17:13:23 +08:00

28 lines
796 B
C#

using System;
namespace XericUI.ReflectionUIGenerator
{
/// <summary>
/// 集合检查
/// </summary>
public class XuiavrgCollectionCheckAttribute : Attribute, IXuiavrgAttribute
{
public readonly int minCount;
public readonly int maxCount;
public readonly bool notEmpty;
public XuiavrgCollectionCheckAttribute(int minCount, int maxCount, bool notEmpty)
{
this.minCount = minCount;
this.maxCount = maxCount;
this.notEmpty = notEmpty;
}
public void BindProperty(XuiavrgInspectorProperty property)
{
property.collectionMinCount = minCount;
property.collectionMaxCount = maxCount;
property.collectionNotEmpty = notEmpty;
}
}
}