public static ModuleNode CreateFromModuleMap(AssemblyNode parent, IOldToNewTupleMap <ModuleMetadata> moduleMap) { var module = new ModuleNode(parent, moduleMap, new NamespaceNode[0]); var types = new TypesMergeManager(moduleMap) .GetMergedCollection() .ToList(); var namespaces = types.GroupBy(e => e.GetFirstNotNullItem().GetNamespace()) .OrderBy(e => e.Key) .Select(e => NamespaceNode.Create(module, e.Key, e.ToArray())) .ToArray(); module.Namespaces = namespaces; return(module); }
protected override void LoadChildren() { LoadAPIItemsContext context = this.apiDiffInfo.GenerateLoadAPIItemsContext(); List <IOldToNewTupleMap <TypeMetadata> > filteredTypeTuples = new TypesMergeManager(ModulesMap).GetMergedCollection().Where(ApiOnlyFilter).ToList(); ObservableCollection <ItemNodeBase> result = new ObservableCollection <ItemNodeBase>(filteredTypeTuples .GroupBy(GetNamespaceFromTypeMap) .OrderBy(g => g.Key) .Select(g => new NamespaceNode(g.Key, g.ToList(), GetDiffItemsList(g, context), this, this.FilterSettings))); context.Validate(); DispatcherObjectExt.BeginInvoke(() => { foreach (var item in result) { this.Children.Add(item); } }); }