mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-14 03:46:34 +08:00
1. 重新设计了Generate项目及相关特性的命名,避免与其他类型混淆。
2. 补充了部分注释。 3. 修改了删除容器节点时,容器内子节点未正确删除的问题。
This commit is contained in:
@@ -16,10 +16,17 @@ namespace Serein.Library
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class AutoRegisterAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 自动注册特性
|
||||
/// </summary>
|
||||
/// <param name="Class"></param>
|
||||
public AutoRegisterAttribute(RegisterSequence Class = RegisterSequence.FlowInit)
|
||||
{
|
||||
this.Class = Class;
|
||||
}
|
||||
/// <summary>
|
||||
/// 注册顺序
|
||||
/// </summary>
|
||||
public RegisterSequence Class ;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,20 @@ namespace Serein.Library
|
||||
[AttributeUsage(AttributeTargets.Parameter)]
|
||||
public class BindConvertorAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 枚举类型
|
||||
/// </summary>
|
||||
public Type EnumType { get; }
|
||||
/// <summary>
|
||||
/// 转换器类型
|
||||
/// </summary>
|
||||
public Type ConvertorType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 绑定转换器特性
|
||||
/// </summary>
|
||||
/// <param name="enum"></param>
|
||||
/// <param name="convertor"></param>
|
||||
public BindConvertorAttribute(Type @enum, Type convertor)
|
||||
{
|
||||
EnumType = @enum;
|
||||
|
||||
@@ -2,11 +2,21 @@
|
||||
|
||||
namespace Serein.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// 绑定值特性
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
||||
public class BindValueAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 绑定的值
|
||||
/// </summary>
|
||||
public object Value { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 绑定值特性构造函数
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public BindValueAttribute(object value)
|
||||
{
|
||||
Value = value;
|
||||
|
||||
@@ -10,6 +10,11 @@ namespace Serein.Library
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public sealed class DynamicFlowAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 动态流程特性构造函数
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="scan"></param>
|
||||
public DynamicFlowAttribute(string name = "",bool scan = true)
|
||||
{
|
||||
Name = name;
|
||||
|
||||
@@ -9,8 +9,16 @@ namespace Serein.Library
|
||||
[AttributeUsage(AttributeTargets.Parameter)]
|
||||
public class EnumTypeConvertorAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 枚举类型
|
||||
/// </summary>
|
||||
public Type EnumType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 枚举类型转换器特性构造函数
|
||||
/// </summary>
|
||||
/// <param name="enum"></param>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public EnumTypeConvertorAttribute(Type @enum)
|
||||
{
|
||||
if (@enum.IsEnum)
|
||||
|
||||
@@ -9,6 +9,13 @@ namespace Serein.Library
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
||||
public sealed class NodeActionAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// 节点行为特性构造函数
|
||||
/// </summary>
|
||||
/// <param name="methodDynamicType"></param>
|
||||
/// <param name="methodTips"></param>
|
||||
/// <param name="scan"></param>
|
||||
/// <param name="lockName"></param>
|
||||
public NodeActionAttribute(NodeType methodDynamicType,
|
||||
string methodTips = "",
|
||||
bool scan = true,
|
||||
|
||||
Reference in New Issue
Block a user