【发布时间】:2013-01-21 12:16:45
【问题描述】:
我正在尝试使用 NDepend 创建另一个自定义查询,但无法弄清楚。
这是我想查询的伪代码:
var list
foreach type t
int newCount = 0
foreach type u in t.TypesUsed
if "new"-operator of u is called anywhere within t
newCount++;
end foreach
list.Add( new Tuple<Type, int>(t, newCount) )
end foreach
return list
我想知道“new”操作符在一个类型中的任何位置被调用了多少次。
我对 NDepend 查询的语法非常陌生。所以一些提示会很有帮助:)
谢谢!
【问题讨论】:
标签: count new-operator ndepend