public ChocolateyFeed(ChocolateyFeedClient feedClient, ChocolateySource source, IInstalledPackagesManager installedPackages)
        {
            this._feedClient = feedClient;
            this._installedPackages = installedPackages;
            this.Source = source;

            this._packageCache = new List<ChocolateyPackage>();
        }
Пример #2
0
        public ChocolateyFeed(ChocolateyFeedClient feedClient, ChocolateySource source, IInstalledPackagesManager installedPackages)
        {
            this._feedClient        = feedClient;
            this._installedPackages = installedPackages;
            this.Source             = source;

            this._packageCache = new List <ChocolateyPackage>();
        }
        public InstalledPackagesViewModel(
            IInstalledPackagesManager packagesManager,
            IChocolateyInstaller installer,
            ConsoleViewModel console)
        {
            this._packagesManager = packagesManager;
            this._installer       = installer;
            this._console         = console;

            this.UninstallPackageCommand         = new RelayCommand <ChocolateyPackageVersion>(async p => await this.UninstallPackage(p), p => p != null && !this.IsWorking);
            this.UpdatePackageCommand            = new RelayCommand <ChocolateyPackageVersion>(async p => await this.UpdatePackage(p), p => p != null && !this.IsWorking);
            this.RefreshInstalledPackagesCommand = new RelayCommand(async() => await this.RefreshPackages(), () => !this.IsWorking);
            this.UpdateAllCommand = new RelayCommand(async() => await this.UpdateAllPackages(), () => !this.IsWorking);

            this.IsWorking       = false;
            this.StatusMessage   = "Ready";
            this.SelectedPackage = null;

            this.InstalledPackages = new ObservableCollection <ChocolateyPackageVersion>();
        }
        public InstalledPackagesViewModel(
            IInstalledPackagesManager packagesManager, 
            IChocolateyInstaller installer, 
            ConsoleViewModel console)
        {
            this._packagesManager = packagesManager;
            this._installer = installer;
            this._console = console;

            this.UninstallPackageCommand = new RelayCommand<ChocolateyPackageVersion>(async p => await this.UninstallPackage(p), p => p != null && !this.IsWorking);
            this.UpdatePackageCommand = new RelayCommand<ChocolateyPackageVersion>(async p => await this.UpdatePackage(p), p => p != null && !this.IsWorking);
            this.RefreshInstalledPackagesCommand = new RelayCommand(async () => await this.RefreshPackages(), () => !this.IsWorking);
            this.UpdateAllCommand = new RelayCommand(async () => await this.UpdateAllPackages(), () => !this.IsWorking);

            this.IsWorking = false;
            this.StatusMessage = "Ready";
            this.SelectedPackage = null;

            this.InstalledPackages = new ObservableCollection<ChocolateyPackageVersion>();
        }
Пример #5
0
 public ChocolateyFeedFactory(IInstalledPackagesManager installedPackages)
 {
     this._feedCache         = new Dictionary <ChocolateySource, IChocolateyFeed>();
     this._installedPackages = installedPackages;
 }
 public ChocolateyFeedFactory(IInstalledPackagesManager installedPackages)
 {
     this._feedCache = new Dictionary<ChocolateySource, IChocolateyFeed>();
     this._installedPackages = installedPackages;
 }