Domanda

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!

È stato utile?

Soluzione

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").

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