public static NamespaceHierarchyTree BuildTree(HashSet<string> namespaces) { NamespaceHierarchyNode root = new NamespaceHierarchyNode(null); foreach (string @namespace in namespaces) { AddNamespaceToTree(root, @namespace); } return new NamespaceHierarchyTree(root); }
public static NamespaceHierarchyTree BuildTree(HashSet <string> namespaces) { NamespaceHierarchyNode root = new NamespaceHierarchyNode(null); foreach (string @namespace in namespaces) { AddNamespaceToTree(root, @namespace); } return(new NamespaceHierarchyTree(root)); }
private static void AddNamespaceToTree(NamespaceHierarchyNode root, string @namespace) { NamespaceHierarchyNode currentNode = root; string[] tokens = @namespace.Split('.'); foreach (string token in tokens) { NamespaceHierarchyNode currentChild; if(!currentNode.Children.TryGetValue(token, out currentChild)) { currentChild = new NamespaceHierarchyNode(token); currentNode.Children[token] = currentChild; } currentNode = currentChild; } currentNode.ContainsClasses = true; }
private static void AddNamespaceToTree(NamespaceHierarchyNode root, string @namespace) { NamespaceHierarchyNode currentNode = root; string[] tokens = @namespace.Split('.'); foreach (string token in tokens) { NamespaceHierarchyNode currentChild; if (!currentNode.Children.TryGetValue(token, out currentChild)) { currentChild = new NamespaceHierarchyNode(token); currentNode.Children[token] = currentChild; } currentNode = currentChild; } currentNode.ContainsClasses = true; }
private static void AddNamespaceToTree(NamespaceHierarchyNode root, string namespace) { V_0 = root; stackVariable3 = new Char[1]; stackVariable3[0] = '.'; V_1 = namespace.Split(stackVariable3);
internal NamespaceHierarchyTree(NamespaceHierarchyNode root) { this.root = root; }
internal NamespaceHierarchyTree(NamespaceHierarchyNode root) { base(); this.root = root; return; }