Skip to content

vipwan/Biwen.AutoClassGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

31ed0f0 · Sep 20, 2024
Sep 20, 2024
Sep 6, 2024
Sep 20, 2024
Sep 19, 2024
Nov 8, 2023
Oct 31, 2023
Oct 31, 2023
Sep 6, 2024
Jun 19, 2024
Aug 30, 2024
Mar 6, 2024
Sep 7, 2024
Sep 4, 2024
Nov 5, 2023
Jan 22, 2024
Nov 12, 2023
Sep 19, 2024
Sep 7, 2024

Repository files navigation

Biwen.AutoClassGen

Usage scenario

  • 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

中文

Usage

dotnet add package Biwen.AutoClassGen.Attributes
dotnet add package Biwen.AutoClassGen

Code Generators

Code Analyzers

  • GEN001 : 标注接口没有继承基础接口因此不能生成类
  • GEN011 : 生成类的类名称不可和接口名重名
  • GEN021 : 推荐使用相同的命名空间
  • GEN031 : 使用[AutoGen]自动生成
  • GEN041 : 重复标注[AutoDto]
  • GEN042 : 不可在abstract类上标注[AutoDto]
  • GEN043 : 标记为[AutoDecor]的类必须是public
  • GEN050 : 文件缺少头部信息
  • GEN051 : 异步方法应该以Async结尾
  • GEN052 : 建议使用文件范围命名空间
  • GEN053 : 源代码非UTF-8编码

Code Fixs

  • 移除无效的[AutoDto]标注
  • 使用[AutoGen]自动生成
  • 推荐使用相同的命名空间
  • 文件缺少头部信息
  • 异步方法应该以Async结尾
  • .etc

Used by

if you use this library, please tell me, I will add your project here.