摘要: 中文版本介绍 **项目地址:https://github.com/JohnYang1210/PycomCAD ** PyComCAD介绍及开发方法 1.综述 ​ 提到Autocad在工业界的二次开发,VB或者Lisp可能作为常用的传统的编程语言。但是,Python语言简洁,优雅,学习门槛低,理应在A 阅读全文
posted @ 2021-02-27 18:32 JohnYang819 阅读(5212) 评论(1) 推荐(1)
摘要: 下面来逐行、深入讲解 DynamicMaxLengthAttribute 的真实工作机制,非常值得理解。 ✅ 整体作用(一句话) ABP 用 反射修改 MaxLengthAttribute 的私有字段 <Length>k__BackingField,从而动态设置最大长度。 ✅ 代码逐行深度解析 pu 阅读全文
posted @ 2025-11-20 19:53 JohnYang819 阅读(8) 评论(0) 推荐(0)
摘要: _currentUser = Substitute.For<ICurrentUser>(); 这是 NSubstitute(一个 .NET 单元测试 mock 框架)中的标准用法,用来“创建一个假的 ICurrentUser 实例”。 下面详细解释它的逻辑。 ✅ 到底发生了什么? Substitut 阅读全文
posted @ 2025-11-15 22:35 JohnYang819 阅读(9) 评论(0) 推荐(0)
摘要: ServiceCollection 和 ServiceProvider 是 .NET 依赖注入系统中的两个核心概念,但它们的职责完全不同。理解这两个概念对看懂 ASP.NET Core / ABP 框架的 DI 机制非常重要。 下面用非常清晰、分层方式给你解释: ✔️ 一句话解释 ServiceCo 阅读全文
posted @ 2025-11-15 22:22 JohnYang819 阅读(20) 评论(0) 推荐(0)
摘要: 来给你几个层次递进的 LINQ Join 示例,从最基础的单表连接到多表、对象导航、分组连接全部覆盖。 以下示例均基于 C# + LINQ to Objects(适用于 EF Core / ABP 的仓储查询场景)。 🌱 一、基本示例:两表连接(内连接 Inner Join) 假设你有两个列表: 阅读全文
posted @ 2025-10-07 17:25 JohnYang819 阅读(16) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tas 阅读全文
posted @ 2025-09-21 23:12 JohnYang819 阅读(11) 评论(0) 推荐(0)
摘要: ![image](https://img2024.cnblogs.com/blog/1599580/202509/1599580-20250921143350368-1877215917.png) ![image](https://img2024.cnblogs.com/blog/1599580/202509/1599580-20250921143507348-808106558.png) 阅读全文
posted @ 2025-09-21 14:35 JohnYang819 阅读(8) 评论(0) 推荐(0)
摘要: [MemoryDiagnoser] public class DMesh3ScenarioBenchmark { private const int N = 2_000_000; // 模拟大规模几何操作 private Random rand = new Random(); [Benchmark] 阅读全文
posted @ 2025-09-09 22:20 JohnYang819 阅读(12) 评论(0) 推荐(0)
摘要: class PointCollectSink : CallbackBase,SimplifiedGeometrySink { public class GlyphContour { public List<RawVector2> Points = new List<RawVector2>(); pu 阅读全文
posted @ 2025-09-07 21:59 JohnYang819 阅读(21) 评论(0) 推荐(0)
摘要: 调用某个异步方法与新线程中启动新的task不同,需要编程人员自己保证async方法快速返回。怎么理解? 这句话指出了异步编程中的一个重要原则:异步方法应该尽可能快速返回控制权。让我详细解释: 核心概念理解 1. 异步方法 vs 新线程 // ❌ 错误理解:异步 == 新线程 async Task D 阅读全文
posted @ 2025-08-27 00:14 JohnYang819 阅读(35) 评论(0) 推荐(0)
摘要: static List<int> CalInts(int len=100000) { List<int> a = Enumerable.Range(0,len).ToList(); return a; } List<int> aa = CalInts(); Stopwatch sw = new St 阅读全文
posted @ 2025-08-04 17:26 JohnYang819 阅读(8) 评论(0) 推荐(0)