mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
GIT练习
This commit is contained in:
54
Library/DynamicFlow/NodeModel/CompositeActionNode.cs
Normal file
54
Library/DynamicFlow/NodeModel/CompositeActionNode.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using Serein.DynamicFlow;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Serein.DynamicFlow.NodeModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 组合动作节点(用于动作区域)
|
||||
/// </summary>
|
||||
public class CompositeActionNode : NodeBase
|
||||
{
|
||||
public List<SingleActionNode> ActionNodes;
|
||||
/// <summary>
|
||||
/// 组合动作节点(用于动作区域)
|
||||
/// </summary>
|
||||
public CompositeActionNode(List<SingleActionNode> actionNodes)
|
||||
{
|
||||
ActionNodes = actionNodes;
|
||||
}
|
||||
public void AddNode(SingleActionNode node)
|
||||
{
|
||||
ActionNodes.Add(node);
|
||||
MethodDetails ??= node.MethodDetails;
|
||||
}
|
||||
|
||||
//public override void Execute(DynamicContext context)
|
||||
//{
|
||||
// //Dictionary<int,object> dict = new Dictionary<int,object>();
|
||||
// for (int i = 0; i < ActionNodes.Count; i++)
|
||||
// {
|
||||
// SingleActionNode? action = ActionNodes[i];
|
||||
// try
|
||||
// {
|
||||
// action.Execute(context);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Debug.Write(ex.Message);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// CurrentState = true;
|
||||
// return;
|
||||
|
||||
|
||||
// /*foreach (var nextNode in TrueBranchNextNodes)
|
||||
// {
|
||||
// nextNode.ExecuteStack(context);
|
||||
// }*/
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user