예제 #1
0
        void Run(
            ProgressMonitorStatusMessage progressMessage,
            IEnumerable <IPackageAction> actions,
            TaskCompletionSource <bool> taskCompletionSource,
            bool clearConsole)
        {
            AddInstallActionsToPendingQueue(actions);
            packageManagementEvents.OnPackageOperationsStarting();
            runCount++;

            List <IPackageAction> actionsList = actions.ToList();

            BackgroundDispatch(() => {
                PackageManagementCredentialService.Reset();
                TryRunActionsWithProgressMonitor(progressMessage, actionsList, taskCompletionSource, clearConsole);
                actionsList     = null;
                progressMessage = null;
            });
        }
예제 #2
0
 public void Run(DotNetProject project, string initialSearch = null)
 {
     try {
         PackageManagementCredentialService.Reset();
         bool configurePackageSources = false;
         do
         {
             using (AddPackagesDialog dialog = CreateDialog(project, initialSearch)) {
                 dialog.ShowWithParent();
                 configurePackageSources = dialog.ShowPreferencesForPackageSources;
                 initialSearch           = dialog.SearchText;
             }
             if (configurePackageSources)
             {
                 ShowPreferencesForPackageSources();
             }
         } while (configurePackageSources);
     } catch (Exception ex) {
         LoggingService.LogInternalError(ex);
     }
 }