From 4f0211ee3a94c7be52979ed75d36d2a975a6e7c6 Mon Sep 17 00:00:00 2001 From: "yang.lee" Date: Wed, 15 Nov 2023 14:29:39 +0800 Subject: [PATCH] =?UTF-8?q?wms=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tnb.Server.sln | 3 +++ .../Filters/NotifyFilterAttribute.cs | 22 ------------------- .../Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj | 4 ++++ 3 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 WarehouseMgr/Tnb.WarehouseMgr/Filters/NotifyFilterAttribute.cs diff --git a/Tnb.Server.sln b/Tnb.Server.sln index 07029d0c..6bf614ee 100644 --- a/Tnb.Server.sln +++ b/Tnb.Server.sln @@ -158,14 +158,17 @@ Global {9FA1FB84-71AB-42A7-9570-F856A4B1EBAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9FA1FB84-71AB-42A7-9570-F856A4B1EBAB}.Debug|Any CPU.Build.0 = Debug|Any CPU {9FA1FB84-71AB-42A7-9570-F856A4B1EBAB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FA1FB84-71AB-42A7-9570-F856A4B1EBAB}.Release|Any CPU.Build.0 = Release|Any CPU {9FA1FB84-71AB-42A7-9570-F856A4B1EBAB}.tianyi|Any CPU.ActiveCfg = tianyi|Any CPU {135D0C0A-9B95-45F2-BE5F-01286F6BB234}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {135D0C0A-9B95-45F2-BE5F-01286F6BB234}.Debug|Any CPU.Build.0 = Debug|Any CPU {135D0C0A-9B95-45F2-BE5F-01286F6BB234}.Release|Any CPU.ActiveCfg = Release|Any CPU + {135D0C0A-9B95-45F2-BE5F-01286F6BB234}.Release|Any CPU.Build.0 = Release|Any CPU {135D0C0A-9B95-45F2-BE5F-01286F6BB234}.tianyi|Any CPU.ActiveCfg = tianyi|Any CPU {D1135D42-7CD0-4579-82B3-D2B121FCE954}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D1135D42-7CD0-4579-82B3-D2B121FCE954}.Debug|Any CPU.Build.0 = Debug|Any CPU {D1135D42-7CD0-4579-82B3-D2B121FCE954}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D1135D42-7CD0-4579-82B3-D2B121FCE954}.Release|Any CPU.Build.0 = Release|Any CPU {D1135D42-7CD0-4579-82B3-D2B121FCE954}.tianyi|Any CPU.ActiveCfg = tianyi|Any CPU {8D3E0381-4B3D-4F44-81C8-535E28418A1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8D3E0381-4B3D-4F44-81C8-535E28418A1B}.Debug|Any CPU.Build.0 = Debug|Any CPU diff --git a/WarehouseMgr/Tnb.WarehouseMgr/Filters/NotifyFilterAttribute.cs b/WarehouseMgr/Tnb.WarehouseMgr/Filters/NotifyFilterAttribute.cs deleted file mode 100644 index aaa3c279..00000000 --- a/WarehouseMgr/Tnb.WarehouseMgr/Filters/NotifyFilterAttribute.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.DependencyInjection; -using Tnb.WarehouseMgr.Entities.Dto.Inputs; -using Tnb.WarehouseMgr.Interfaces; - -namespace Tnb.WarehouseMgr.Filters -{ - public class NotifyFilterAttribute : ActionFilterAttribute - { - - public override async void OnActionExecuted(ActionExecutedContext context) - { - string actionName = context.ActionDescriptor.RouteValues["action"]!; - ITaskMessageNotify taskMessageNotify = context.HttpContext.RequestServices.GetRequiredService(); - if (taskMessageNotify != null) - { - NotifyMessage message = new() { TaskName = actionName }; - await taskMessageNotify.Writer.WriteAsync(message); - } - } - } -} diff --git a/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj b/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj index 736045a9..59e3c42a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj +++ b/WarehouseMgr/Tnb.WarehouseMgr/Tnb.WarehouseMgr.csproj @@ -9,6 +9,10 @@ Debug;Release + + + +