public static int GetAllExpressions(SourceFolder folder) { var expressions = from file in folder.Archive.FileUnits from expression in file.Descendants(SRC.Expression) select expression; return(expressions.Count()); }
public static IEnumerable <MethodCall> GetAllCalls(SourceFolder folder) { var allCalls = from scope in folder.Data.GlobalScope.GetDescendantScopesAndSelf() from call in scope.MethodCalls select call; return(allCalls); }
public static Dictionary <string, IList <MethodDefinition> > GetAllMethodsByName(SourceFolder folder) { var results = new Dictionary <string, IList <MethodDefinition> >(); var methodsByName = from method in GetAllMethods(folder) group method by method.Name into g select g; foreach (var group in methodsByName) { results[group.Key] = group.ToList <MethodDefinition>(); } return(results); }
public static IEnumerable <MethodDefinition> GetAllMethods(SourceFolder folder) { return(folder.Data.GlobalScope.GetDescendantScopesAndSelf <MethodDefinition>()); }