重写了节点的view、viewmodel关系,实现了对画布元素的选取功能,重构了底层依赖,添加了对net .Framework4.6.1以上的Framework类库支持

This commit is contained in:
fengjiayi
2024-09-12 20:32:54 +08:00
parent ec6e09ced1
commit f286fc644a
120 changed files with 91218 additions and 761 deletions

49
Library/NodeAttribute.cs Normal file
View File

@@ -0,0 +1,49 @@
using Serein.Library.Enums;
using System;
namespace Serein.Library.Attributes
{
/// <summary>
/// 表示该属性为自动注入依赖项
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public sealed class AutoInjectionAttribute : Attribute
{
}
/// <summary>
/// 用来判断一个类是否需要注册并构建实例(单例模式场景使用)
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class DynamicFlowAttribute : Attribute
{
public DynamicFlowAttribute(bool scan = true)
{
Scan = scan;
}
public bool Scan { get; set; } = true;
}
/// <summary>
/// 标记一个方法是什么类型加载dll后用来拖拽到画布中
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class NodeActionAttribute : Attribute
{
public NodeActionAttribute(NodeType methodDynamicType,
string methodTips = "",
bool scan = true,
string lockName = "")
{
Scan = scan;
MethodDynamicType = methodDynamicType;
MethodTips = methodTips;
LockName = lockName;
}
public bool Scan { get; set; }
public string MethodTips { get; }
public NodeType MethodDynamicType { get; }
public string LockName { get; }
}
}