2024-10-20 12:10:57 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Serein.Library
|
|
|
|
|
|
{
|
2024-10-22 00:13:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 标识一个类中的某些字段需要生成相应代码
|
|
|
|
|
|
/// </summary>
|
2024-10-20 12:10:57 +08:00
|
|
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = true)]
|
2024-10-22 00:13:13 +08:00
|
|
|
|
public sealed class AutoPropertyAttribute : Attribute
|
2024-10-20 12:10:57 +08:00
|
|
|
|
{
|
2024-10-22 00:13:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// <para>属性路径</para>
|
|
|
|
|
|
/// <para>CustomNode : 自定义节点</para>
|
|
|
|
|
|
/// </summary>
|
2024-10-20 12:10:57 +08:00
|
|
|
|
public string ValuePath = string.Empty;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 自动生成环境的属性
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Field, Inherited = true)]
|
2024-10-22 00:13:13 +08:00
|
|
|
|
public sealed class PropertyInfoAttribute : Attribute
|
2024-10-20 12:10:57 +08:00
|
|
|
|
{
|
2024-10-22 00:13:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否通知UI
|
|
|
|
|
|
/// </summary>
|
2024-10-20 12:10:57 +08:00
|
|
|
|
public bool IsNotification = false;
|
2024-10-22 00:13:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否使用Console.WriteLine打印
|
|
|
|
|
|
/// </summary>
|
2024-10-20 12:10:57 +08:00
|
|
|
|
public bool IsPrint = false;
|
2024-10-22 00:13:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否禁止参数进行修改(初始化后不能再通过setter修改)
|
|
|
|
|
|
/// </summary>
|
2024-10-20 21:59:42 +08:00
|
|
|
|
public bool IsProtection = false;
|
2024-10-20 12:10:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|