Exemple #1
0
        public async Task ApplyAnUpdate(
            IReadOnlyCollection <PackageUpdateSet> updates,
            NuGetSources sources)
        {
            if (!updates.Any())
            {
                return;
            }

            var filtered = await _selection
                           .Filter(updates, p => Task.FromResult(true));

            if (!filtered.Any())
            {
                _logger.Detailed("All updates were filtered out");
                return;
            }

            var candidate = filtered.First();

            var reporter = new ConsoleReporter();

            _logger.Minimal("Updating " + reporter.Describe(candidate));

            await _updateRunner.Update(candidate, sources);
        }
Exemple #2
0
        private async Task ApplyUpdates(IReadOnlyCollection <PackageUpdateSet> updates, IFolder workingFolder, NuGetSources sources)
        {
            await _solutionsRestore.CheckRestore(updates, workingFolder, sources);

            foreach (var update in updates)
            {
                var reporter = new ConsoleReporter();
                _logger.Minimal("Updating " + reporter.Describe(update));

                await _updateRunner.Update(update, sources);
            }
        }