static void EnsureNamespaceList() { if (allNodes != null) { return; } typeToNode = new Dictionary <Type, NamespaceWrapper>(); allNodes = new Dictionary <string, NamespaceWrapper>(); foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) { foreach (Type t in a.GetTypes()) { if (t.IsSpecialName) { continue; } if (t.IsGenericType) { continue; } if (t.IsGenericTypeDefinition) { continue; } else { if (t.IsGenericType) { continue; } } if (t.IsInterface) { continue; } if (!t.IsVisible) { continue; } var p = t.FullName; if (!t.IsGenericTypeDefinition && p.IndexOfAny(SpecialChars) != -1) { continue; } var node = NamespaceWrapper.MakeType(t); allNodes[node.path] = node; typeToNode[node.type] = node; } } foreach (var k in allNodes.Keys.ToArray()) { var node = allNodes[k]; RegisterTypeNode(node); } }