Beispiel #1
0
        private IEnumerable <Dependency> findDependenciesFor(Dependency dependency, UpdateMode mode, int depth, SearchLocation location)
        {
            IRemoteNuget nuget = null;

            if (location == SearchLocation.Local && _solution.HasLocalCopy(dependency.Name))
            {
                try
                {
                    // Try to hit the local zip and read it. Mostly for testing but it'll detect a corrupted local package as well
                    nuget = _solution.LocalNuget(dependency.Name);
                    nuget.Dependencies().ToList();

                    RippleLog.Debug(dependency.Name + " already installed");
                }
                catch
                {
                    nuget = null;
                }
            }

            if (nuget == null)
            {
                nuget = NugetFor(dependency);
            }

            var dependencies = new List <Dependency>();

            if (depth != 0)
            {
                var dep         = dependency;
                var markAsFixed = mode == UpdateMode.Fixed || !isFloated(dependency);

                if (dep.IsFloat() && markAsFixed)
                {
                    dep = new Dependency(nuget.Name, nuget.Version, UpdateMode.Fixed);
                }

                dependencies.Add(dep);
            }

            nuget
            .Dependencies()
            .Each(x => dependencies.AddRange(findDependenciesFor(x, mode, depth + 1, location)));

            return(dependencies.OrderBy(x => x.Name));
        }
Beispiel #2
0
        private void processNuget(IRemoteNuget nuget, Dependency dependency, UpdateMode mode, int depth, SearchLocation location,
                                  List <Dependency> dependencies)
        {
            if (depth != 0)
            {
                var dep         = dependency;
                var markAsFixed = mode == UpdateMode.Fixed || !FeedRegistry.IsFloat(_solution, dependency);

                if (dep.IsFloat() && markAsFixed)
                {
                    dep = new Dependency(nuget.Name, nuget.Version, UpdateMode.Fixed);
                }

                dependencies.Add(dep);
            }

            nuget
            .Dependencies()
            .Each(x => findDependenciesFor(x, mode, depth + 1, location, dependencies));
        }
Beispiel #3
0
        private void processNuget(IRemoteNuget nuget, Dependency dependency, UpdateMode mode, int depth, SearchLocation location,
                                  List<Dependency> dependencies)
        {
            if (depth != 0)
            {
                var dep = dependency;
                var markAsFixed = mode == UpdateMode.Fixed || !FeedRegistry.IsFloat(_solution, dependency);

                if (dep.IsFloat() && markAsFixed)
                {
                    dep = new Dependency(nuget.Name, nuget.Version, UpdateMode.Fixed);
                }

                dependencies.Add(dep);
            }

            nuget
                .Dependencies()
                .Each(x => findDependenciesFor(x, mode, depth + 1, location, dependencies));
        }
Beispiel #4
0
 public IEnumerable <Dependency> Dependencies()
 {
     return(_inner.Dependencies());
 }