Let's say I have method A.M1
.
It is called in B.M2
2 times and in B.M3
3 times.
I need to find all number of usages (like Resharper does through find usages interface). So the sum for method calls would be 5.
Following Query:
from m in Methods
where m.HasAttribute("specific attribute")
orderby m.MethodsCallingMe.Count() descending
select new { m, m.MethodsCallingMe }
gives me only 2 usages for method A.M1.
Could you please help me to find the usages number?