取消使用流程上下文自定义的字典数据;更改流程环境接口的输出方式

This commit is contained in:
fengjiayi
2024-11-08 17:30:51 +08:00
parent dff9a00fb6
commit 8c54b9a014
41 changed files with 448 additions and 505 deletions

View File

@@ -106,7 +106,7 @@ namespace Serein.Library.Web
var url = AddRoutesUrl(autoHostingAttribute, routeAttribute, controllerType, method);
if (url is null) continue;
Console.WriteLine(url);
SereinEnv.WriteLine(InfoType.INFO, url);
var apiType = routeAttribute.ApiType.ToString();
var config = new ApiHandleConfig(method);
@@ -248,7 +248,7 @@ namespace Serein.Library.Web
catch (Exception ex1)
{
Console.WriteLine(ex1);
SereinEnv.WriteLine(InfoType.ERROR, ex1.ToString());
}
}

View File

@@ -1,4 +1,5 @@
using System;
using Serein.Library.Utils;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Net;
@@ -54,7 +55,7 @@ namespace Serein.Library.Web
catch(Exception ex)
{
listener = null;
Console.WriteLine(ex);
SereinEnv.WriteLine(InfoType.INFO, ex.ToString());
}
//_ = Task.Run(async () =>
@@ -120,7 +121,7 @@ namespace Serein.Library.Web
// 获取用户的IP地址和端口
IPAddress ipAddress = remoteEndPoint.Address;
int port = remoteEndPoint.Port;
Console.WriteLine("外部连接:" + ipAddress.ToString() + ":" + port);
SereinEnv.WriteLine(InfoType.INFO, "外部连接:" + ipAddress.ToString() + ":" + port);
}
// 停止服务器
@@ -132,9 +133,9 @@ namespace Serein.Library.Web
listener?.Stop(); // 停止监听
listener?.Close(); // 关闭监听器
}
catch (Exception EX)
catch (Exception ex)
{
Console.WriteLine(EX);
SereinEnv.WriteLine(InfoType.ERROR, ex.ToString());
}
}