Пример #1
0
    public async void Install()
    {
        var chocolateyInstaller = new ChocolateyInstaller(new ProcessRunner(), new PowerShellRunner());
        await chocolateyInstaller.InstallChocolatey(null, null);

        Assert.IsTrue(chocolateyInstaller.IsInstalled());
    }
 public void ReCheck()
 {
     if (chocolateyInstaller.IsInstalled())
     {
         eventAggregator.Publish <UserInstalledChocolatey>();
     }
 }
Пример #3
0
    public async void Handle(RunInstallEvent message)
    {
        installWasAttempted = true;
        itemsToInstall      = message.SelectedItems;
        if (chocolateyInstaller.IsInstalled())
        {
            var chocolateyUpgradeRequired = await chocolateyInstaller.ChocolateyUpgradeRequired();

            if (chocolateyUpgradeRequired)
            {
                ActivateModel <UpdateChocolateyViewModel>();
                return;
            }
            ActivateInstallingViewModel();
            return;
        }
        ActivateModel <InstallChocolateyViewModel>();
    }
Пример #4
0
    public async void ReCheck()
    {
        try
        {
            CanAcceptInput = false;
            await RefreshDetectedVersion();

            var chocolateyUpgradeRequired = await chocolateyInstaller.ChocolateyUpgradeRequired();

            if (chocolateyInstaller.IsInstalled() && !chocolateyUpgradeRequired)
            {
                eventAggregator.Publish <UserInstalledChocolatey>();
            }
        }
        finally
        {
            CanAcceptInput = true;
        }
    }
Пример #5
0
    public void IsInstalled()
    {
        var chocolateyInstaller = new ChocolateyInstaller(new ProcessRunner(), new PowerShellRunner());

        Assert.IsTrue(chocolateyInstaller.IsInstalled());
    }
 public void IsInstalled()
 {
     var chocolateyInstaller = new ChocolateyInstaller(new ProcessRunner(), new PowerShellRunner());
     Assert.IsTrue(chocolateyInstaller.IsInstalled());
 }
 public async void Install()
 {
     var chocolateyInstaller = new ChocolateyInstaller(new ProcessRunner(), new PowerShellRunner());
     await chocolateyInstaller.InstallChocolatey(null, null);
     Assert.IsTrue(chocolateyInstaller.IsInstalled());
 }