Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top