隐藏页面特效

07 2024 档案

摘要://自定义异常 public class MyException : Exception { public MyException(string? message) : base(message) { } } public class CircuitBreakerExample { //熔断规则 p 阅读全文 »
posted @ 2024-07-31 10:39 DaiWK 阅读(18) 评论(0) 推荐(1) 编辑
摘要:中间件定义 /// <summary> /// 自定义中间件1 /// </summary> public class MyMiddleware : IMiddleware { public async Task InvokeAsync(HttpContext context, RequestDel 阅读全文 »
posted @ 2024-07-16 23:34 DaiWK 阅读(19) 评论(0) 推荐(1) 编辑
摘要:利用特性Attribute+反射+代理类实现AOP 一、定义自定义特性 /// <summary> /// 自定义特性,方法执行前调用 /// </summary> public class CustomBeforeAttribute : Attribute { } /// <summary> // 阅读全文 »
posted @ 2024-07-15 09:42 DaiWK 阅读(23) 评论(0) 推荐(2) 编辑
摘要://实体类定义 public class User { public int Id { get; set; } public string Name { get; set; } } public class UserIncome { public int Id { get; set; } publi 阅读全文 »
posted @ 2024-07-11 00:51 DaiWK 阅读(6) 评论(0) 推荐(0) 编辑
摘要:转载 C#-表达式树 - 一只独行的猿 - 博客园 (cnblogs.com) int[] ints1 = new int[] { 1,23,434,631,3,56,86,83 }; Console.WriteLine($"筛选前数据:{string.Join(',',ints1)}"); Exp 阅读全文 »
posted @ 2024-07-10 23:56 DaiWK 阅读(13) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示