mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-08 02:30:49 +08:00
IOC容器添加构造函数注入(DLL类中使用AutoRegisterAttribute特性标注的类,会在流程启动时自动注册),提高可读性。
This commit is contained in:
@@ -13,13 +13,18 @@ namespace Serein.Library.Web
|
||||
/// <summary>
|
||||
/// HTTP接口监听类
|
||||
/// </summary>
|
||||
[AutoRegister]
|
||||
public class WebServer
|
||||
{
|
||||
[AutoInjection]
|
||||
public IRouter Router { get; set; } // 路由器
|
||||
private readonly IRouter Router;// 路由器
|
||||
public WebServer(IRouter router)
|
||||
{
|
||||
this.Router = router;
|
||||
}
|
||||
|
||||
[AutoInjection]
|
||||
public NodeRunCts nodeRunCts { get; set; }
|
||||
|
||||
//[AutoInjection]
|
||||
//public NodeRunCts nodeRunCts { get; set; }
|
||||
|
||||
private HttpListener listener; // HTTP 监听器
|
||||
private RequestLimiter requestLimiter; //接口防刷
|
||||
|
||||
Reference in New Issue
Block a user