Exemplo n.º 1
0
        public void Analyze(Project project, NuGetConversionReport report)
        {
            var dependencies = FixedDependenciesFor(project);
            dependencies.Each(dependency =>
            {
                var existing = _dependencies.SingleOrDefault(x => x.MatchesName(dependency));
                if (existing == null)
                {
                    _dependencies.Add(dependency.Copy());
                }
                else if (dependency.SemanticVersion() > existing.SemanticVersion())
                {
                    // TODO -- Report a warning
                    _dependencies.Remove(existing);
                    _dependencies.Add(dependency.Copy());
                }

                dependency.Float();
            });
        }
Exemplo n.º 2
0
        public void Analyze(Project project, NuGetConversionReport report)
        {
            var dependencies = FixedDependenciesFor(project);

            dependencies.Each(dependency =>
            {
                var existing = _dependencies.SingleOrDefault(x => x.MatchesName(dependency));
                if (existing == null)
                {
                    _dependencies.Add(dependency.Copy());
                }
                else if (dependency.SemanticVersion() > existing.SemanticVersion())
                {
                    // TODO -- Report a warning
                    _dependencies.Remove(existing);
                    _dependencies.Add(dependency.Copy());
                }

                dependency.Float();
            });
        }
Exemplo n.º 3
0
        public NuGetConversionReport Convert(Solution solution)
        {
            var report = new NuGetConversionReport();
            var analyzer = new DependencyAnalyzer();

            solution.Projects.Each(project =>
            {
                analyzer.Analyze(project, report);
                project.Proj.ConvertToRippleDependenciesConfig();

                var directory = project.FilePath.ParentDirectory();
                var packagesConfig = directory.AppendPath("packages.config").ToFullPath();
                
                if (File.Exists(packagesConfig))
                {
                    File.Delete(packagesConfig);
                }
            });

            analyzer.Fill(solution);

            return report;
        }
Exemplo n.º 4
0
        public NuGetConversionReport Convert(Solution solution)
        {
            var report   = new NuGetConversionReport();
            var analyzer = new DependencyAnalyzer();

            solution.Projects.Each(project =>
            {
                analyzer.Analyze(project, report);
                project.Proj.ConvertToRippleDependenciesConfig();

                var directory      = project.FilePath.ParentDirectory();
                var packagesConfig = directory.AppendPath("packages.config").ToFullPath();

                if (File.Exists(packagesConfig))
                {
                    File.Delete(packagesConfig);
                }
            });

            analyzer.Fill(solution);

            return(report);
        }