Skip to content

优化了部分代码#5

Open
Poker-sang wants to merge 3 commits into
dotnet9:mainfrom
Poker-sang:poker/refactor
Open

优化了部分代码#5
Poker-sang wants to merge 3 commits into
dotnet9:mainfrom
Poker-sang:poker/refactor

Conversation

@Poker-sang
Copy link
Copy Markdown

@Poker-sang Poker-sang commented Jan 21, 2026

对代码逻辑和API行为进行了优化,包括:

  • 使I18nExtension支持AOT
  • 消除AOT警告,支持AOT
  • 消除库项目中的Nullable警告
  • 减少循环次数和冗余代码
  • 减少读取文件次数,提高效率
  • 减少类型耦合,防止潜在的内存泄露
  • 优化部分API的风格,使其变得更符合直觉
  • 在执行方法之前检查参数问题,提前准确地报错原因
  • 引入了少量破坏性更改(如返回值由List变为IReadOnlyCollection以减少列表复制)
  • 支持面向 .NET 6 (fix 是否可以增加支持.net6.0? #4
  • 格式化代码

后续可能的优化:

  • 用SG等方法消除所有反射代码(ResXExtension目前需要反射)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

是否可以增加支持.net6.0?

1 participant