using Serein.Library; using Serein.Library.Api; namespace Serein.NodeFlow { /// /// 流程任务类,包含流程的起始节点和所有节点信息。 /// public class FlowTask { /// /// 是否异步启动流程 /// public bool IsWaitStartFlow { get; set; } = true; /// /// 流程起始节点 /// public Func? GetStartNode { get; set; } /// /// 获取当前画布流程的所有节点 /// public Func>? GetNodes { get; set; } } /// /// 节点任务执行依赖 /// public sealed class FlowWorkOptions() { /// /// 流程IOC容器 /// public required ISereinIOC FlowIOC { get; set; } /// /// 流程运行环境 /// public required IFlowEnvironment Environment { get; set; }// = environment; /// /// 表示运行环境状态 /// public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource(); /// /// 上下文线程池 /// public required Serein.Library.Utils.ObjectPool FlowContextPool { get; set; } /// /// 每个画布需要启用的节点 /// public Dictionary Flows { get; set; } = []; /// /// 需要注册的类型 /// public Dictionary> AutoRegisterTypes { get; set; } = []; /// /// 初始化时需要的方法 /// public List InitMds { get; set; } = []; /// /// 加载时需要的方法 /// public List LoadMds { get; set; } = []; /// /// 退出时需要调用的方法 /// public List ExitMds { get; set; } = []; } }