1

有没有办法检查一个类型是否使用 NDepend 实现具有某些泛型参数的泛型类型?

实现的接口属性返回泛型类型,但没有特定的泛型参数。所以以 IList 为例,如果某种类型实现 IList,我不想。

4

1 回答 1

0

您可以编写如下查询:

from t in Types where t.Implement("System.Collections.Generic.IList<T>")
select t

但您不能编写如下查询:

from t in Types where t.Implement("System.Collections.Generic.IList<System.Int32>") 
select t

所以答案是否定的 有没有办法检查一个类型是否正在使用 NDepend 实现具有某些泛型参数的泛型类型?

这种情况将来可能会发生变化,请随时向NDepend 用户语音页面添加请求。

于 2013-11-06T11:11:28.357 回答