Exemple #1
0
        public static Task <NugetResult> Find(Solution solution, Dependency dependency)
        {
            var finders = Finders.Where(x => x.Matches(dependency)).ToArray();
            var search  = new NugetSearch(finders);

            return(search.FindDependency(solution, dependency));
        }
Exemple #2
0
        public static Task<NugetResult> Find(Solution solution, Dependency dependency)
        {
            var finders = Finders.Where(x => x.Matches(dependency)).ToArray();
            var search = new NugetSearch(finders);

            return search.FindDependency(solution, dependency);
        }
Exemple #3
0
        public void Filter(Solution solution, Dependency dependency, NugetResult result)
        {
            if (!dependency.IsFloat() || !result.Found)
            {
                return;
            }

            var latest = NugetSearch.FindLatestByName(solution, dependency.Name);

            if (!latest.Found)
            {
                return;
            }

            if (latest.Nuget.Version > result.Nuget.Version)
            {
                result.Import(latest);
            }
        }
Exemple #4
0
        public NugetResult Find(Solution solution, Dependency dependency)
        {
            var feeds  = FeedRegistry.FloatedFeedsFor(solution).ToArray();
            var result = NugetSearch.FindNuget(feeds, x =>
            {
                var feed  = x.As <IFloatingFeed>();
                var nuget = feed.FindLatest(dependency);
                if (nuget != null && dependency.Mode == UpdateMode.Fixed && nuget.IsUpdateFor(dependency))
                {
                    return(null);
                }

                return(nuget);
            });

            if (!result.Found)
            {
                feeds
                .Where(x => x.IsOnline())
                .Each(files => files.DumpLatest());
            }

            return(result);
        }
Exemple #5
0
 public NugetResult Find(Solution solution, Dependency dependency)
 {
     return(NugetSearch.FindLatestByName(solution, dependency.Name));
 }
Exemple #6
0
 public NugetResult Find(Solution solution, Dependency dependency)
 {
     return(NugetSearch.FindNuget(solution, dependency));
 }