private CommunityDTO GetCommunityDTO(SymbolIndexer functionIndexer, ICollection <ISymbol> collections) { return(new CommunityDTO() { name = "root", type = "root", communities = collections.Select(s => GetCommunityDTO(functionIndexer, s)), functions = new long[] {}, }); }
private CommunityDTO GetCommunityDTO(SymbolIndexer functionIndexer, ISymbol s) { return(new CommunityDTO() { name = s.Name, type = s.Kind.ToString(), communities = tree.ChildrenOf(s).Where(s => s.Kind != SymbolKind.Method).Select(s => GetCommunityDTO(functionIndexer, s)), functions = tree.ChildrenOf(s).Where(s => s.Kind == SymbolKind.Method).Select(s => functionIndexer.IndexOf(s)).Where(x => x.HasValue).Select(x => x.Value) }); }
internal CommunityDTO GetCommunityDTO(SymbolIndexer functionIndexer) { return(GetCommunityDTO(functionIndexer, tree.GetRoots())); }