刘磊
2025-11-11 6fed1f731b16c1820a43fc34130a70b21465e2bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace WIDESEAWCS_Core.Filter
{
    public class ActionExecuteFilter : IActionFilter
    {
        public void OnActionExecuted(ActionExecutedContext context)
        {
            //throw new NotImplementedException();
        }
 
        public void OnActionExecuting(ActionExecutingContext context)
        {
            //throw new NotImplementedException();
            //foreach (KeyValuePair<string, object?> item in context.ActionArguments)
            //{
            //    if (item.Value != null)
            //    {
            //        string name = item.Value.GetType().Name;
            //        Console.Out.WriteLine(name);
            //    }
            //    else
            //    {
            //        context.Result = new JsonResult(new { Status = false, Message = "参数不能为空" });
            //        return;
            //    }
            //}
 
        }
    }
}