How do I retrieve all attributes of a .NET method using NDepend?
Pregunta
I would like to retrieve (using NDepend) a list of all attributes of a given type that are declared on a method. Something like
warnif count > 0 from m in JustMyCode.Methods where
m.HasAttribute("MyNamespace.MyAttribute")
select new { m, m.Attributes("MyNamespace.MyAttribute") }
Is this possible? Is there a radically different way of doing this? Thanks!
Solución
I am not sure to understand completely the question.
If you mean that a method is tagged with several occurrences of MyNamespace.MyAttribute
NDepend won't give more info than true
for the expression m.HasAttribute("MyNamespace.MyAttribute")
.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow