

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
123456789# 枚举(Enum)规则1011## 基本要求12131. 枚举需添加 Display 特性(支持多语言)142. 每个枚举值必须添加 XML 文档注释153. 枚举值使用 PascalCase 命名164. 明确指定枚举值(避免依赖默认值)1718## 枚举示例(多语言)1920```csharp21using CodeSpirit.Localization.Resources;22using System.ComponentModel.DataAnnotations;2324/// <summary>25/// 题目类型枚举26/// </summary>27public enum QuestionType28{29 /// <summary>30 /// 单选题31 /// </summary>32 [Display(Name = "SingleChoice", ResourceType = typeof(DisplayResources))]33 SingleChoice = 1,3435 /// <summary>36 /// 多选题37 /// </summary>38 [Display(Name = "MultipleChoice", ResourceType = typeof(DisplayResources))]39 MultipleChoice = 2,4041 /// <summary>42 /// 判断题43 /// </summary>44 [Display(Name = "TrueFalse", ResourceType = typeof(DisplayResources))]45 TrueFalse = 346}47```4849## 资源文件配置5051对应的资源文件(Display.resx):52```xml53<data name="SingleChoice" xml:space="preserve">54 <value>单选题</value>55</data>56<data name="MultipleChoice" xml:space="preserve">57 <value>多选题</value>58</data>59<data name="TrueFalse" xml:space="preserve">60 <value>判断题</value>61</data>62```6364英文资源文件(Display.en.resx):65```xml66<data name="SingleChoice" xml:space="preserve">67 <value>Single Choice</value>68</data>69<data name="MultipleChoice" xml:space="preserve">70 <value>Multiple Choice</value>71</data>72<data name="TrueFalse" xml:space="preserve">73 <value>True/False</value>74</data>75```7677## 在 QueryDto 中的使用7879枚举用于查询 DTO 筛选条件时,**仅使用 `[DisplayName]`**,不要添加 `[AmisSelectField]`。框架会根据枚举的 Display 特性自动生成下拉选项。详见 [dto.mdc - 查询 DTO 中枚举字段](mdc:.cursor/rules/dto.mdc)。8081## 参考文档8283- 多语言规范: [i18n.mdc](mdc:.cursor/rules/i18n.mdc)84- 查询 DTO 枚举配置: [dto.mdc](mdc:.cursor/rules/dto.mdc)85
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| xin-lai/CodeSpirit.cursor/rules/api-design.mdc · 56 | Cursor rules | no sections | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/controller.mdc · 56 | Cursor rules | api | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/dependency-injection.mdc · 56 | Cursor rules | api | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/dto.mdc · 56 | Cursor rules | no sections | 50/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/js.mdc · 56 | Cursor rules | apidocs | 46/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/security.mdc · 56 | Cursor rules | database | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/service.mdc · 56 | Cursor rules | no sections | 50/100 | 14 days ago | |
| xin-lai/CodeSpiritAGENTS.md · 56 | AGENTS.md | styleagent-behaviourdocs | 66/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/ai-development.mdc · 56 | Cursor rules | api | 46/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/amis-cards.mdc · 56 | Cursor rules | no sections | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/csproj.mdc · 56 | Cursor rules | api | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/database.mdc · 56 | Cursor rules | no sections | 74/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/naming-conventions.mdc · 56 | Cursor rules | no sections | 50/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/package-management.mdc · 56 | Cursor rules | no sections | 74/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/project-structure.mdc · 56 | Cursor rules | api | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/testing.mdc · 56 | Cursor rules | testing-strategy | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/cs.mdc · 56 | Cursor rules | no sections | 25/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/all.mdc · 56 | Cursor rules | testing-strategyapi | 50/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/css.mdc · 56 | Cursor rules | ui | 54/100 | 14 days ago | |
| xin-lai/CodeSpirit.cursor/rules/i18n.mdc · 56 | Cursor rules | no sections | 50/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 46 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 14 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 14 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 14 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 14 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 46 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/xin-lai-codespirit-cursor-rules-enum)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.