Esempio n. 1
0
        public static GoCityNode Convert(CodeModel codeModel)
        {
            var root = new GoCityNode
            {
                Name = codeModel.Name,
            };

            foreach (var ns in codeModel.GetRootNamespaces())
            {
                root.Children.Add(CreateGoCityNode(ns));
            }
            root.GenerateChildrenPosition();
            return(root);
        }
Esempio n. 2
0
        private static GoCityNode CreateGoCityNode(CCNamespace ns)
        {
            var nsNode = new GoCityNode
            {
                Name  = ns.Name,
                NType = GoCityNodeType.PACKAGE,
            };

            foreach (var c in ns.Classes)
            {
                nsNode.Children.Add(CreateGoCityNode(c));
            }
            foreach (var n in ns.Namespaces)
            {
                nsNode.Children.Add(CreateGoCityNode(n));
            }
            return(nsNode);
        }