mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-05 15:56:33 +08:00
优化FlowEnv
This commit is contained in:
@@ -48,8 +48,10 @@ namespace Serein.NodeFlow
|
||||
throw new Exception($"无法创建{nodeControlType}节点,节点类型尚未注册。");
|
||||
}
|
||||
|
||||
|
||||
// 生成实例
|
||||
var nodeObj = Activator.CreateInstance(nodeMVVM.ModelType, env);
|
||||
//var nodeObj = Activator.CreateInstance(nodeMVVM.ModelType, env);
|
||||
var nodeObj = env.IOC.CreateObject(nodeMVVM.ModelType);
|
||||
if (nodeObj is not IFlowNode nodeModel)
|
||||
{
|
||||
throw new Exception($"无法创建目标节点类型的实例[{nodeControlType}]");
|
||||
|
||||
Reference in New Issue
Block a user