新增TCP扩展

This commit is contained in:
zgf committed 2023-08-11 15:17:28 +08:00
1 parent 514d6f5255
commit f119665d29
26 files changed
+2457 -34

No files matched your search

+2 -2
View File
@@ -134,7 +134,7 @@ namespace WalkingTec.Mvvm.Mvc
{
get
{
if (_sharedir == null)
/*if (_sharedir == null)
{
var up = Directory.GetParent(MainDir);
var sharedir = up.GetDirectories().Where(x => x.Name.ToLower().EndsWith(".shared")).FirstOrDefault();
@@ -148,7 +148,7 @@ namespace WalkingTec.Mvvm.Mvc
}
_sharedir = sharedir.FullName;
}
}*/
return _sharedir;
}
}
@@ -19,13 +19,18 @@ using WalkingTec.Mvvm.Core.Json;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using WalkingTec.Mvvm.Core.Extensions;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System.Dynamic;
using NPOI.SS.Formula.Functions;
namespace WalkingTec.Mvvm.Mvc.Filters
{
public class FrameworkFilter : ActionFilterAttribute
{
private string requestMsg = "";
public override void OnActionExecuting(ActionExecutingContext context)
{
requestMsg = Newtonsoft.Json.JsonConvert.SerializeObject( context.ActionArguments);
var ctrl = context.Controller as IBaseController;
if (ctrl == null)
{
@@ -385,6 +390,12 @@ namespace WalkingTec.Mvvm.Mvc.Filters
log.ActionUrl = context.HttpContext.Request.Path;
log.IP = context.HttpContext.GetRemoteIpAddress();
log.Remark = context.Exception?.ToString() ?? string.Empty;
log.Request = requestMsg;
if (log.ModuleName.StartsWith("HHWMS"))
{
dynamic reMsg = context.Result as dynamic;
log.Result = Newtonsoft.Json.JsonConvert.SerializeObject(reMsg?.Value);
}
if (string.IsNullOrEmpty(log.Remark) == false && log.Remark.Length > 2000)
{
log.Remark = log.Remark.Substring(0, 2000);