Example #1
0
        private IEnumerable <Project> GetProjects(SystemPath path)
        {
            var projects = GetProjectFiles(path);

            foreach (var projectFiles in projects)
            {
                var packages = CreatePackages(projectFiles.PackagesFile);
                yield return(new Project(projectFiles.CsprojFile.Name, packages));
            }
        }
Example #2
0
        private static IEnumerable <ProjectFiles> GetProjectFiles(SystemPath path)
        {
            var root     = new DirectoryInfo(path.Path);
            var projects =
                root.EnumerateDirectories("*", SearchOption.AllDirectories)
                .Where(di => di.GetFiles("*.csproj", SearchOption.TopDirectoryOnly).Any())
                .Select(di => new ProjectFiles
            {
                Directory    = di,
                CsprojFile   = di.GetFiles("*.csproj", SearchOption.TopDirectoryOnly).FirstOrDefault(),
                PackagesFile =
                    new PackagesConfig(di.GetFiles("packages.config", SearchOption.TopDirectoryOnly).FirstOrDefault())
            });

            return(projects);
        }
Example #3
0
        public Domain.System CreateFromPath(SystemPath path)
        {
            var projects = GetProjects(path);

            return(new Domain.System(projects));
        }