Beispiel #1
0
 public BrowserViewModel(IPackageSourceSelector packageSource, ISearchService search, IInstallService install)
 {
     Packages = new ObservableCollection <PackageViewModel>();
     Search   = new SearchCommand(this, packageSource, search);
     Paging   = new PagingViewModel(Search);
     Install  = new InstallCommand(install);
 }
 public SearchCommand(BrowserViewModel viewModel, IPackageSourceSelector packageSource, ISearchService search)
 {
     Ensure.NotNull(viewModel, "viewModel");
     Ensure.NotNull(packageSource, "packageSource");
     Ensure.NotNull(search, "search");
     this.viewModel     = viewModel;
     this.packageSource = packageSource;
     this.search        = search;
 }
Beispiel #3
0
 public RefreshInstalledCommand(InstalledViewModel viewModel, IPackageSourceSelector packageSource, IInstallService service)
 {
     Ensure.NotNull(viewModel, "viewModel");
     Ensure.NotNull(packageSource, "packageSource");
     Ensure.NotNull(service, "service");
     this.viewModel     = viewModel;
     this.packageSource = packageSource;
     this.service       = service;
 }
Beispiel #4
0
        public UpdatesViewModel(IPackageSourceSelector packageSource, IInstallService installService, ISearchService searchService, SelfPackageConfiguration selfPackageConfiguration, ISelfUpdateService selfUpdate, IComparer <IPackageIdentity> packageVersionComparer)
        {
            Ensure.NotNull(installService, "service");
            Ensure.NotNull(searchService, "searchService");

            Packages  = new ObservableCollection <PackageUpdateViewModel>();
            Refresh   = new RefreshUpdatesCommand(this, packageSource, installService, searchService, selfPackageConfiguration, packageVersionComparer);
            Update    = new UpdateCommand(installService, selfUpdate);
            UpdateAll = new UpdateAllCommand(this);
        }
        public InstalledViewModel(IPackageSourceSelector packageSource, IInstallService service, SelfPackageConfiguration selfPackageConfiguration)
        {
            Ensure.NotNull(service, "service");
            this.service = service;

            Packages     = new ObservableCollection <IInstalledPackage>();
            Refresh      = new RefreshInstalledCommand(this, packageSource, service);
            Reinstall    = new ReinstallCommand(service, selfPackageConfiguration);
            Uninstall    = new UninstallCommand(service, selfPackageConfiguration);
            UninstallAll = new UninstallAllCommand(this);
        }
 public RefreshUpdatesCommand(UpdatesViewModel viewModel, IPackageSourceSelector packageSource, IInstallService installService, ISearchService searchService, SelfPackageConfiguration selfPackageConfiguration, IComparer <IPackageIdentity> packageVersionComparer)
 {
     Ensure.NotNull(viewModel, "viewModel");
     Ensure.NotNull(packageSource, "packageSource");
     Ensure.NotNull(installService, "installService");
     Ensure.NotNull(searchService, "searchService");
     Ensure.NotNull(selfPackageConfiguration, "selfPackageConfiguration");
     Ensure.NotNull(packageVersionComparer, "packageVersionComparer");
     this.viewModel                = viewModel;
     this.packageSource            = packageSource;
     this.installService           = installService;
     this.searchService            = searchService;
     this.selfPackageConfiguration = selfPackageConfiguration;
     this.packageVersionComparer   = packageVersionComparer;
 }