public void Run() { PackageManagementBackgroundDispatcher.Dispatch(() => { RunSynchronous(); IsRunning = true; }); }
public void ExecuteCommand(string command) { PackageManagementBackgroundDispatcher.Dispatch(() => { powerShellHost.ExecuteCommand(command); WritePrompt(); }); }
public void ProcessUserInput(string line) { PackageManagementBackgroundDispatcher.Dispatch(() => { ProcessLine(line); WritePrompt(); }); }
static PackageManagementServices() { options = new PackageManagementOptions(); progressMonitorFactory = new PackageManagementProgressMonitorFactory(); backgroundPackageActionRunner = new BackgroundPackageActionRunner(progressMonitorFactory, packageManagementEvents); projectTargetFrameworkMonitor = new ProjectTargetFrameworkMonitor(projectService); packageCompatibilityHandler = new PackageCompatibilityHandler(); packageCompatibilityHandler.MonitorTargetFrameworkChanges(projectTargetFrameworkMonitor); updatedPackagesInWorkspace = new UpdatedNuGetPackagesInWorkspace(packageManagementEvents); projectOperations = new PackageManagementProjectOperations(backgroundPackageActionRunner, packageManagementEvents); workspace = new PackageManagementWorkspace(); credentialService = new PackageManagementCredentialService(); credentialService.Initialize(); PackageManagementBackgroundDispatcher.Initialize(); nuGetConfigFileChangedMonitor.MonitorFileChanges(); //analyzerPackageMonitor = new AnalyzerPackageMonitor (); }
protected override void Run() { var runner = new PackageRestoreRunner(); PackageManagementBackgroundDispatcher.Dispatch(() => { runner.Run(); }); }
public void Run() { PackageManagementBackgroundDispatcher.Dispatch(() => { RunSynchronous(); IsRunning = true; }); // thread = CreateThread(RunSynchronous); // thread.Start(); }
public void ProcessUserInput(string line) { OnRunningCommand(); InitializeToken(); PackageManagementBackgroundDispatcher.Dispatch(() => { powerShellHost.ExecuteCommand(line); OnCommandCompleted(); WritePrompt(); }); }
void UpdateWorkingDirectory(string directory) { if (powerShellHost == null) { return; } string command = String.Format("Set-Location {0}", directory); PackageManagementBackgroundDispatcher.Dispatch(() => { powerShellHost.ExecuteCommand(command); }); }
void RestoreAndCheckForUpdates() { bool checkUpdatesAfterRestore = ShouldCheckForUpdates && AnyProjectHasPackages(); var restorer = new PackageRestorer(projectService.OpenSolution.Solution); PackageManagementBackgroundDispatcher.Dispatch(() => { restorer.Restore(); if (checkUpdatesAfterRestore && !restorer.RestoreFailed) { CheckForUpdates(); } }); }
void RestoreAndCheckForUpdates(Solution solution) { bool checkUpdatesAfterRestore = ShouldCheckForUpdates && AnyProjectHasPackages(solution); var packageManagementSolution = new PackageManagementSolution(new PackageManagementSolutionProjectService(solution)); var restorer = new PackageRestorer(packageManagementSolution); PackageManagementBackgroundDispatcher.Dispatch(() => { restorer.Restore(); if (checkUpdatesAfterRestore && !restorer.RestoreFailed) { CheckForUpdates(); } restorer = null; }); }
void RunPowerShellInitializationScripts(Solution solution) { OnRunningCommand(); InitializeToken(); PackageManagementBackgroundDispatcher.Dispatch(() => { bool showPrompt = SafeRunPowerShellInitializationScripts(solution); OnCommandCompleted(); if (showPrompt) { WritePrompt(); } }); }
protected override void Run() { IDotNetProject project = GetSelectedProject(); if (project == null) { return; } ProgressMonitorStatusMessage progressMessage = ProgressMonitorStatusMessageFactory.CreateRestoringPackagesInProjectMessage(); var runner = new PackageRestoreRunner(); PackageManagementBackgroundDispatcher.Dispatch(() => { runner.Run(project, progressMessage); }); }
void SolutionLoaded(object sender, SolutionEventArgs e) { ClearUpdatedPackagesInSolution(); if (ShouldRestorePackages) { RestoreAndCheckForUpdates(e.Solution); } else if (ShouldCheckForUpdates && AnyProjectHasPackages(e.Solution)) { // Use background dispatch even though the check is not done on the // background dispatcher thread so that the solution load completes before // the check for updates starts. Otherwise the check for updates finishes // before the solution loads and the status bar never reports that // package updates were being checked. PackageManagementBackgroundDispatcher.Dispatch(() => { CheckForUpdates(); }); } }