示例#1
0
        public static Dictionary <string, Proj> ExtractProjects(Core.ILogger logger, Core.Paths paths, List <string> filePaths, string configPlatform = "Debug|AnyCPU")
        {
            var projects = new Dictionary <string, Proj>();
            var skipped  = new List <string>();

            foreach (var filePath in filePaths)
            {
                var ext = System.IO.Path.GetExtension(filePath);

                if (ext == ".vcxproj")
                {
                    logger.Info("Appended for reading \"{0}\"", filePath);
                    logger.Info("Reading Visual C++");
                    var proj = new VCProj(logger, filePath, paths, configPlatform);
                    projects[filePath] = proj;
                    continue;
                }

                if (ext == ".csproj")
                {
                    var proj = new CSProj(logger, filePath, paths, configPlatform);
                    projects[filePath] = proj;
                    continue;
                }

                if (ext == ".shproj")
                {
                    var proj = new SHProj(logger, filePath, paths, configPlatform);
                    projects[filePath] = proj;
                    continue;
                }

                if (ext == ".vbproj")
                {
                    var proj = new VBProj(logger, filePath, paths, configPlatform);
                    projects[filePath] = proj;
                    continue;
                }

                skipped.Add(filePath);
            }

            filePaths.Clear();
            filePaths.AddRange(skipped);

            return(projects);
        }
示例#2
0
        public static void Extract(Core.ILogger logger, Core.Paths paths, string filePath, Dictionary <string, Core.Project> projects, Dictionary <Core.Project, List <string> > dependencies, Dictionary <string, string> mapping, string configPlatform)
        {
            var proj = new CSProj(logger, filePath, paths, configPlatform);

            projects[proj.Name] = proj.Extract(logger, paths, filePath, dependencies, mapping);
        }