문제

Is there a way to check if a type is implementing a generic type with certain generic parameters using NDepend?

The implemented interface property returns the generic type, but without specific generic parameters. So IList for example, instead I want to no if a certain type implements IList.

도움이 되었습니까?

해결책

You can write a query like:

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

but you cannot write a query like:

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

So the answer is no to Is there a way to check if a type is implementing a generic type with certain generic parameters using NDepend?

This situation might evolve in the future, feel free to add request to the NDepend User Voice page.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top