Esempio n. 1
0
        public static List <string> GetCsprojsList(string moduleName)
        {
            if (!Exists(moduleName))
            {
                return(new List <string>());
            }

            var configs         = ConfigurationParser(moduleName).GetConfigurations();
            var buildsInfo      = configs.SelectMany(config => BuildParser(moduleName).Get(config));
            var files           = new List <string>();
            var moduleDirectory = Path.Combine(Helper.CurrentWorkspace, moduleName);

            var projects = buildsInfo.Select(info => info.Target)
                           .Where(t => t != "None").Distinct();

            foreach (var project in projects)
            {
                var vsParser = new VisualStudioProjectParser(
                    Path.Combine(moduleDirectory, project), Helper.GetModules());
                files.AddRange(vsParser.GetCsprojList());
            }

            return(files.Distinct().ToList());
        }