假设我有一个方法
以下查询:
请帮助我找到用法数。
A.M1
。
它在B.M2
中被调用了2次,在B.M3
中被调用了3次。
我需要找到所有使用情况的数量(就像Resharper通过查找用法接口一样)。因此,方法调用的总和将是5。以下查询:
from m in Methods
where m.HasAttribute("specific attribute")
orderby m.MethodsCallingMe.Count() descending
select new { m, m.MethodsCallingMe }
仅为方法A.M1提供了2个用法。请帮助我找到用法数。