Esempio n. 1
0
        public static VsFile Parse(FileCodeModel fileCodeModel)
        {
            var vsFile = new VsFile();

            foreach (CodeElement cdElement in fileCodeModel.CodeElements)
            {
                if (cdElement.Kind == vsCMElement.vsCMElementNamespace)
                {
                    Parse(vsFile,cdElement);
                }
            }
            return vsFile;
        }
Esempio n. 2
0
        private static VsFile Parse(VsFile vsFile,CodeElement cdElement)
        {
            vsFile.Namespaces = cdElement.FullName;
            foreach (CodeElement codeElement in ((CodeNamespace)cdElement).Members)
            {
                if (codeElement.Kind == vsCMElement.vsCMElementClass)
                {
                    vsFile.Classes.Add(VsClass.Parse(codeElement));

                }
                else if (codeElement.Kind == vsCMElement.vsCMElementInterface)
                {

                    vsFile.Interfaces.Add(VsInterfaces.Parse(codeElement));
                }

            }
            return vsFile;
        }