流浪のwolf

卷帝

导航

2023年10月28日

C# Webapi Filter 过滤器 - 生命周期钩子函数 - Action Filter 基础

摘要: ACTION Filter IAsyncACtionFilter 接口 ; 1.注入ActionFilter // 注册过滤器 builder.Services.Configure<MvcOptions>(opt => { opt.Filters.Add<MyExceptionFilter>(); 阅读全文

posted @ 2023-10-28 12:11 流浪のwolf 阅读(72) 评论(0) 推荐(0) 编辑

C# Webapi Filter 过滤器 - 生命周期钩子函数 - Exception Filter 基础

摘要: 什么是Filter ? 1. 切面编程机制,在 ASP.NET Core 特定的位置执行我们自定义的代码; 2. ASP.NET Core 中的Filter五种类型,Authorization ,filter ,resource filter ,action filter ,exception fi 阅读全文

posted @ 2023-10-28 12:04 流浪のwolf 阅读(136) 评论(0) 推荐(0) 编辑