protected override async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            viewModel.Packages.Clear();

            foreach (IInstalledPackage current in await installService.GetInstalledAsync(packageSource.Sources, cancellationToken))
            {
                IPackage latest = await searchService.FindLatestVersionAsync(packageSource.Sources, current.Definition, viewModel.IsPrereleaseIncluded, cancellationToken);

                if (latest != null && packageVersionComparer.Compare(latest, current.Definition) > 0)
                {
                    viewModel.Packages.Add(new PackageUpdateViewModel(
                                               current.Definition,
                                               latest,
                                               viewModel,
                                               selfPackageConfiguration.Equals(current.Definition)
                                               ));
                }
            }

            Completed?.Invoke();
        }
Exemplo n.º 2
0
 protected override async Task ExecuteAsync(CancellationToken cancellationToken)
 {
     viewModel.Packages.Clear();
     viewModel.Packages.AddRange(await service.GetInstalledAsync(packageSource.Sources, cancellationToken));
 }