1.优化了平移缩放逻辑

2.优化了触发器的执行,优化了节点执行时的代码逻辑
3.优化了节点方法委托的参数获取
This commit is contained in:
fengjiayi
2024-09-18 16:45:41 +08:00
parent 9041be139f
commit ef54c40d10
13 changed files with 640 additions and 743 deletions

View File

@@ -19,14 +19,14 @@ namespace Serein.Library.Entity
/// 是否为显式参数
/// </summary>
public bool IsExplicitData { get; set; }
/// <summary>
/// 显式类型
/// </summary>
public Type ExplicitType { get; set; }
///// <summary>
///// 显式类型
///// </summary>
//public Type ExplicitType { get; set; }
/// <summary>
/// 显示类型编号>
/// </summary>
///// <summary>
///// 显示类型编号>
///// </summary>
public string ExplicitTypeName { get; set; }
/// <summary>
@@ -56,7 +56,7 @@ namespace Serein.Library.Entity
{
Index = Index,
IsExplicitData = IsExplicitData,
ExplicitType = ExplicitType,
// ExplicitType = ExplicitType,
DataType = DataType,
ParameterName = ParameterName,
ExplicitTypeName = ExplicitTypeName,

View File

@@ -1,4 +1,5 @@
using System;
using System.CodeDom;
namespace Serein.Library.Ex
{
@@ -7,6 +8,7 @@ namespace Serein.Library.Ex
/// </summary>
public class FlipflopException: Exception
{
public bool IsCancel { get; }
public FlipflopException(string message, bool isCancel = true) :base(message)
{

View File

@@ -40,8 +40,23 @@ namespace Serein.Library.Web
}
listener.Prefixes.Add(prefixe); // 添加监听前缀
listener.Start(); // 开始监听
try
{
listener.Start(); // 开始监听
Task.Run(async () =>
{
while (listener.IsListening)
{
var context = await listener.GetContextAsync(); // 获取请求上下文
ProcessRequestAsync(context); // 处理请求
}
});
}
catch(Exception ex)
{
listener = null;
Console.WriteLine(ex);
}
//_ = Task.Run(async () =>
//{
@@ -58,14 +73,7 @@ namespace Serein.Library.Web
// }
//});
Task.Run(async () =>
{
while (listener.IsListening)
{
var context = await listener.GetContextAsync(); // 获取请求上下文
ProcessRequestAsync(context); // 处理请求
}
});
return this;
}
@@ -115,8 +123,8 @@ namespace Serein.Library.Web
// 停止服务器
public void Stop()
{
listener.Stop(); // 停止监听
listener.Close(); // 关闭监听器
listener?.Stop(); // 停止监听
listener?.Close(); // 关闭监听器
}
}