内置了Web Server/IRouter的http api请求处理类

This commit is contained in:
fengjiayi
2024-09-17 15:58:37 +08:00
parent 6d85390395
commit 86da5b3ba6
9 changed files with 123 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ using Serein.Library.Core.NodeFlow;
using Serein.Library.Entity;
using Serein.Library.Enums;
using Serein.Library.Utils;
using Serein.Library.Web;
using Serein.NodeFlow.Base;
using Serein.NodeFlow.Model;
@@ -173,6 +174,10 @@ namespace Serein.NodeFlow
Context.SereinIoc.Build(); // 预防有人在加载时才注册类型,再绑定一次
ExitAction = () =>
{
SereinIOC.Run<WebServer>(web => {
web?.Stop();
});
foreach (MethodDetails? md in exitMethods)
{
object?[]? data = [md.ActingInstance, args];
@@ -188,6 +193,9 @@ namespace Serein.NodeFlow
}
FlowState = RunState.Completion;
FlipFlopState = RunState.Completion;
};
#endregion