Exemple #1
0
        private void LoadedPackages(LoadedPackagesFromRepository data)
        {
            PackageRepositoryViewModel repositoryViewModel = _packageRepositories.FirstOrDefault(repo => repo.Name == data.Repository.Name);

            if (repositoryViewModel != null)
            {
                WpfHelpers.DispatchToMainThread(() => repositoryViewModel.SetPackages(data.Packages));
            }
        }
Exemple #2
0
        private static void ReadPackageRepositories(
            IEnumerable <IPackageRepository> remoteRepositories,
            IList <PackageRepositoryViewModel> results)
        {
            foreach (var packageRepository in remoteRepositories)
            {
                PackageRepositoryViewModel viewModel = new PackageRepositoryViewModel
                {
                    Name           = packageRepository.Name,
                    PackagesLoaded = false
                };

                results.Add(viewModel);
            }
        }
Exemple #3
0
        private void ReadPackageRepositories(IEnumerable<IPackageRepository> remoteRepositories)
        {
            foreach (var packageRepository in remoteRepositories)
            {
                PackageRepositoryViewModel viewModel = new PackageRepositoryViewModel
                {
                        Name = packageRepository.Name
                };

                IEnumerable<PackageGroupViewModel> packages = TranslateAndGroupPackages(packageRepository.PackagesByName.NotNull());
                viewModel.PackageGroups.AddRange(packages);

                _packageRepositories.Add(viewModel);
            }
        }