mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-10 03:30:48 +08:00
IOC容器添加构造函数注入(DLL类中使用AutoRegisterAttribute特性标注的类,会在流程启动时自动注册),提高可读性。
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Net461DllTest.Signal;
|
||||
using Net461DllTest.Device;
|
||||
using Net461DllTest.Signal;
|
||||
using Net461DllTest.ViewModel;
|
||||
using Serein.Library.Api;
|
||||
using Serein.Library.Attributes;
|
||||
@@ -11,7 +12,7 @@ using System.Windows.Forms;
|
||||
|
||||
namespace Net461DllTest.LogicControl
|
||||
{
|
||||
|
||||
[AutoRegister]
|
||||
public class ViewManagement
|
||||
{
|
||||
|
||||
@@ -46,8 +47,11 @@ namespace Net461DllTest.LogicControl
|
||||
[DynamicFlow]
|
||||
public class ViewLogicControl
|
||||
{
|
||||
[AutoInjection]
|
||||
public ViewManagement ViewManagement { get; set; }
|
||||
private readonly ViewManagement ViewManagement;
|
||||
public ViewLogicControl(ViewManagement ViewManagement)
|
||||
{
|
||||
this.ViewManagement = ViewManagement;
|
||||
}
|
||||
|
||||
[NodeAction(NodeType.Init)]
|
||||
public void Init(IDynamicContext context)
|
||||
|
||||
Reference in New Issue
Block a user