mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-10 03:30:48 +08:00
1.优化了平移缩放逻辑
2.优化了触发器的执行,优化了节点执行时的代码逻辑 3.优化了节点方法委托的参数获取
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Serein.Library.Entity;
|
||||
using Serein.Library.Api;
|
||||
using Serein.Library.Entity;
|
||||
using Serein.Library.Enums;
|
||||
using Serein.NodeFlow.Base;
|
||||
|
||||
@@ -19,7 +20,10 @@ namespace Serein.NodeFlow.Model
|
||||
ActionNodes = actionNodes;
|
||||
}
|
||||
|
||||
|
||||
public override object? Execute(IDynamicContext context)
|
||||
{
|
||||
throw new NotImplementedException("动作区域暂未实现");
|
||||
}
|
||||
|
||||
internal override Parameterdata[] GetParameterdatas()
|
||||
{
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace Serein.NodeFlow.Model
|
||||
/// <returns></returns>
|
||||
public override object? Execute(IDynamicContext context)
|
||||
{
|
||||
// NextOrientation = ConnectionType.IsSucceed;
|
||||
|
||||
// 条件区域中遍历每个条件节点
|
||||
foreach (SingleConditionNode? node in ConditionNodes)
|
||||
{
|
||||
@@ -39,9 +37,7 @@ namespace Serein.NodeFlow.Model
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return PreviousNode?.FlowData;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Serein.Library.Entity;
|
||||
using Serein.Library.Api;
|
||||
using Serein.Library.Entity;
|
||||
using Serein.NodeFlow.Base;
|
||||
|
||||
namespace Serein.NodeFlow.Model
|
||||
@@ -8,62 +9,7 @@ namespace Serein.NodeFlow.Model
|
||||
/// </summary>
|
||||
public class SingleActionNode : NodeModelBase
|
||||
{
|
||||
//public override void Execute(DynamicContext context)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// Execute(context, base.MethodDetails);
|
||||
// CurrentState = true;
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Debug.Write(ex.Message);
|
||||
// CurrentState = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
//public void Execute(DynamicContext context, MethodDetails md)
|
||||
//{
|
||||
// if (DelegateCache.GlobalDicDelegates.TryGetValue(md.MethodName, out Delegate del))
|
||||
// {
|
||||
|
||||
// object? result = null;
|
||||
|
||||
// if (md.ExplicitDatas.Length == 0)
|
||||
// {
|
||||
// if (md.ReturnType == typeof(void))
|
||||
// {
|
||||
// ((Action<object>)del).Invoke(md.ActingInstance);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// result = ((Func<object, object>)del).Invoke(md.ActingInstance);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// object?[]? parameters = GetParameters(context, MethodDetails);
|
||||
// if (md.ReturnType == typeof(void))
|
||||
// {
|
||||
// ((Action<object, object[]>)del).Invoke(md.ActingInstance, parameters);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// result = ((Func<object, object[], object>)del).Invoke(md.ActingInstance, parameters);
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 根据 ExplicitDatas.Length 判断委托类型
|
||||
// //var action = (Action<object, object[]>)del;
|
||||
|
||||
// // 调用委托并获取结果
|
||||
// // action.Invoke(MethodDetails.ActingInstance, parameters);
|
||||
|
||||
// //parameters = [md.ActingInstance, "", 123, ""];
|
||||
|
||||
// context.SetFlowData(result);
|
||||
// }
|
||||
//}
|
||||
internal override Parameterdata[] GetParameterdatas()
|
||||
{
|
||||
if (base.MethodDetails.ExplicitDatas.Length > 0)
|
||||
|
||||
Reference in New Issue
Block a user