- In many cases, we will have a lot of request objects, such as GetIdRequest, GetUserRequest, etc..., and these requests may have a large number of the same fields. For example, the multi-tenant Id, the number of pages, and these attribute fields may have validation rules, binding rules, and Swagger descriptions. If all this code needs to be written, it will add a lot of work, so Biwen.AutoClassGen came into being to solve this pain point...
- In many cases, we will have a lot of DTO objects,
- AOP & Decorator
- Auto Inject
- Version Info
dotnet add package Biwen.AutoClassGen.Attributes
dotnet add package Biwen.AutoClassGen
- Gen DTO Usage doc
- Gen Request Usage doc
- Gen Decoration Usage doc
- Gen AutoInject Usage doc
- Gen Version
- Gen Assembly Metadata
GEN001
: 标注接口没有继承基础接口因此不能生成类GEN011
: 生成类的类名称不可和接口名重名GEN021
: 推荐使用相同的命名空间GEN031
: 使用[AutoGen]
自动生成GEN041
: 重复标注[AutoDto]
GEN042
: 不可在abstract
类上标注[AutoDto]
GEN043
: 标记为[AutoDecor]
的类必须是public
的GEN044
:[AutoDto]
引用了外部类是不允许的GEN045
:[AutoDto]
标注的类必须是partial类GEN050
: 文件缺少头部信息GEN051
: 异步方法应该以Async
结尾GEN052
: 建议使用文件范围命名空间GEN053
: 源代码非UTF-8
编码
- 移除无效的
[AutoDto]
标注 - 使用
[AutoGen]
自动生成 - 推荐使用相同的命名空间
- 文件缺少头部信息
- 异步方法应该以
Async
结尾 - .etc