mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
IOC容器添加构造函数注入(DLL类中使用AutoRegisterAttribute特性标注的类,会在流程启动时自动注册),提高可读性。
This commit is contained in:
@@ -200,8 +200,12 @@ namespace Serein.NodeFlow.Base
|
||||
#endregion
|
||||
|
||||
MethodDetails md = MethodDetails;
|
||||
var del = md.MethodDelegate.Clone();
|
||||
md.ActingInstance ??= context.Env.IOC.GetOrRegisterInstantiate(MethodDetails.ActingInstanceType);
|
||||
//var del = md.MethodDelegate.Clone();
|
||||
if (!context.Env.TryGetDelegate(md.MethodName, out var del))
|
||||
{
|
||||
throw new Exception("不存在对应委托");
|
||||
}
|
||||
md.ActingInstance ??= context.Env.IOC.Get(MethodDetails.ActingInstanceType);
|
||||
object instance = md.ActingInstance;
|
||||
|
||||
var haveParameter = md.ExplicitDatas.Length > 0;
|
||||
|
||||
Reference in New Issue
Block a user