private async Task InstallAppsAsync <TApp>(List <TApp> apps) where TApp : IApp { foreach (var app in apps) { if (app is IDownloadApp downloadApp) { await downloadAppInstaller.InstallAsync(downloadApp); } else { await appInstaller.InstallOrUpgradeAsync(app); } appConfigurator.Configure(app); } }
public async Task InstallAsync() { await downloadAppInstaller.InstallAsync(WingetCliApp); await powerShell.ExecuteAsync("winget list winget --accept-source-agreements"); }