Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有哪些指标以及哪些工具可以衡量 C# 代码的SOLID ness?或指示哪些地方最有害地违反原则的工具?
Scott Hanselman 有一篇关于NDepend的优秀文章。另外要查看违规情况,您还可以使用 Visual Studio 附带的代码分析;您可以使用代码分析策略编辑器来选择规则。
您可以使用静态分析工具(一些内置于 Visual Studio 2008 及更高版本、专业版及更高版本)或NDepend。
使用 NDepend,您可以看到不同类的紧密耦合程度、代码库的内聚度等等。