Example #1
0
        public override bool Execute(FindNugetsInput input)
        {
            var solution = Solution.For(input);
            var feeds    = FeedRegistry.FeedsFor(solution);
            var results  = feeds.SelectMany(feed =>
            {
                return(feed
                       .FindAllLatestByName(input.Nuget)
                       .Select(nuget => new SearchResult
                {
                    Nuget = nuget,
                    Provenance = feed.Repository
                }));
            });

            results
            .OrderBy(x => x.Nuget.Name)
            .ThenBy(x => x.Nuget.Version)
            .Each(result =>
            {
                RippleLog.Info("{0}, {1} ({2})".ToFormat(result.Nuget.Name, result.Nuget.Version, result.Provenance.Source));
            });


            return(true);
        }
Example #2
0
 public static NugetResult FindLatestByName(Solution solution, string name)
 {
     return(FindNuget(FeedRegistry.FeedsFor(solution), feed => feed.FindLatestByName(name)));
 }
Example #3
0
 public static NugetResult FindNuget(Solution solution, Dependency dependency)
 {
     return(FindNuget(FeedRegistry.FeedsFor(solution), feed => feed.Find(dependency)));
 }