有没有办法绕过 CA1726:UsePreferredTerms?

发布于 2024-08-25 08:04:50 字数 344 浏览 3 评论 0原文

I have a problem with the code analysis rule CA1726:UsePreferredTerms. Our business domain has two crucial concepts named Case and Flag. According to CA, it's apparently a deadly sin to use these names, however I really don't care since, as I said, they are crucial concepts in our domain model. CA complains not only about the type declarations but about every method parameter-name aswell. So does anyone know if there is a workaround other than adding loads of suppressions or disabling the rule altogether? Could I add the names to a custom dictionary?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你曾走过我的故事 2024-09-01 08:04:50

我建议将这些名称添加到自定义词典中作为您的第一次努力,是的。这是一件非常简单的事情,我必须为我为各种问题领域术语所做的每个重要项目添加一个自定义字典。

I would suggest adding the names to a custom dictionary as your first ditch effort, yes. It's a dead-simple thing to do, and I've had to add a custom dictionary for every single non-trivial project that I've worked on for various problem-domain terms.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文