コード例 #1
0
        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);
            }
        }
コード例 #2
0
        public async Task InstallAsync()
        {
            await downloadAppInstaller.InstallAsync(WingetCliApp);

            await powerShell.ExecuteAsync("winget list winget --accept-source-agreements");
        }