using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Serein.Library { /// /// 通过枚举来区分该怎么生成代码 /// public enum NodeValuePath { /// /// 默认值 /// None, /// /// 节点本身 /// Node, /// /// 节点对应的方法 /// Method, /// /// 节点方法对应的入参 /// Parameter, /// /// 节点的调试设置 /// DebugSetting, } /// /// 标识一个类中的某些字段需要生成相应代码 /// [AttributeUsage(AttributeTargets.Class, Inherited = true)] public sealed class FlowDataPropertyAttribute : Attribute { /// /// 属性路径 /// CustomNode : 自定义节点 /// public NodeValuePath ValuePath = NodeValuePath.None; /// /// 表示该类是否为节点实现类 /// public bool IsNodeImp = false; } /// /// 自动生成环境的属性 /// [AttributeUsage(AttributeTargets.Field, Inherited = true)] public sealed class DataInfoAttribute : Attribute { /// /// 是否通知远程环境(如果在远程环境下) /// public bool IsNotification = false; /// /// 是否使用Console.WriteLine打印 /// public bool IsPrint = false; /// /// 是否禁止参数进行修改(初始化后不能再通过 Setter 修改) /// public bool IsProtection = false; /// /// 是否需要验证参数 /// public bool IsVerify = false; /* /// /// 自定义代码(属性变更前) /// [Obsolete("此属性已经过时,可能在下一个版本中移除", false)] public string CustomCodeAtStart = null; /// /// 自定义代码(属性变更后) /// [Obsolete("此属性已经过时,可能在下一个版本中移除", false)] public string CustomCodeAtEnd = null;*/ } }