コード例 #1
0
        public static NamespaceHierarchyTree BuildTree(HashSet<string> namespaces)
        {
            NamespaceHierarchyNode root = new NamespaceHierarchyNode(null);
            foreach (string @namespace in namespaces)
	        {
                AddNamespaceToTree(root, @namespace);
	        }

            return new NamespaceHierarchyTree(root);
        }
コード例 #2
0
        public static NamespaceHierarchyTree BuildTree(HashSet <string> namespaces)
        {
            NamespaceHierarchyNode root = new NamespaceHierarchyNode(null);

            foreach (string @namespace in namespaces)
            {
                AddNamespaceToTree(root, @namespace);
            }

            return(new NamespaceHierarchyTree(root));
        }
コード例 #3
0
        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;
        }
コード例 #4
0
        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;
        }
コード例 #5
0
 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;
 }
コード例 #7
0
 internal NamespaceHierarchyTree(NamespaceHierarchyNode root)
 {
     base();
     this.root = root;
     return;
 }
コード例 #8
0
 internal NamespaceHierarchyTree(NamespaceHierarchyNode root)
 {
     this.root = root;
 }