mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
重写了节点的view、viewmodel关系,实现了对画布元素的选取功能,重构了底层依赖,添加了对net .Framework4.6.1以上的Framework类库支持
This commit is contained in:
35
Library.Core/NodeFlow/Tool/Attribute.cs
Normal file
35
Library.Core/NodeFlow/Tool/Attribute.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Serein.Library.Api.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Serein.Library.Core.NodeFlow.Tool
|
||||
{
|
||||
/// <summary>
|
||||
/// 用来判断一个类是否需要注册并构建实例(单例模式场景使用)
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class DynamicFlowAttribute(bool scan = true) : Attribute
|
||||
{
|
||||
public bool Scan { get; set; } = scan;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标记一个方法是什么类型,加载dll后用来拖拽到画布中
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
||||
public class MethodDetailAttribute(DynamicNodeType methodDynamicType,
|
||||
string methodTips = "",
|
||||
bool scan = true,
|
||||
string lockName = "") : Attribute
|
||||
{
|
||||
public bool Scan { get; set; } = scan;
|
||||
public string MethodTips { get; } = methodTips;
|
||||
public DynamicNodeType MethodDynamicType { get; } = methodDynamicType;
|
||||
public string LockName { get; } = lockName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user