如何衡量 C# 代码的可靠性?

发布于 2024-08-19 14:49:41 字数 154 浏览 7 评论 0原文

有哪些指标和工具可以衡量 C# 代码的SOLID?或者有工具来表明哪些地方违反了原则造成的危害最大?

Which metrics are there and which tools exist to measure the SOLIDness of C# code? Or tools to indicate where the principles are violated most harmfully?

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

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

发布评论

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

评论(2

各空 2024-08-26 14:49:41

Scott Hanselman 有一篇关于 NDepend 的精彩文章。另外,为了查看违规情况,您还可以使用 Visual Studio 附带的代码分析;您可以使用代码分析策略编辑器来选择规则。

Scott Hanselman has an excellent article on NDepend. Also to see violation you can also use Code Analysis that comes with Visual Studio; you can use Code Analysis Policy Editor to choose rules.

转角预定愛 2024-08-26 14:49:41

您可以使用静态分析工具(有些工具内置于 Visual Studio 2008 及更高版本、专业版及更高版本中),或 NDepend< /a>.

通过 NDepend,您可以了解不同类的耦合程度、代码库的内聚程度等等。

You can use a static analysis tool (some are built into Visual Studio 2008 and above, professional editions and higher), or NDepend.

With NDepend, you can see how tightly coupled different classes are, what the cohesion of your codebase is like and more.

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