private ShowSkippedProjectWideProcessMessage ( SkippedReasons reason, string include ) : void | ||
reason | SkippedReasons | |
include | string | |
Résultat | void |
bool DisableTestAdapterCore(PrigViewModel vm) { vm.BeginProjectWideProcessProgress(ProjectWideProcesses.TestAdapterDisabling); var machinePreq = new MachinePrerequisite(Resources.NuGetRootPackageVersion); machinePreq.ProfilerStatusChecking += profLoc => vm.ReportProfilerStatusCheckingProgress(25u, profLoc); if (!MachineWideInstaller.HasBeenInstalled(machinePreq)) { vm.ShowSkippedProjectWideProcessMessage(SkippedReasons.NotRegisteredYet, null); vm.EndSkippedProjectWideProcessProgress(SkippedReasons.NotRegisteredYet, null); return(false); } var command = @" Import-Module ([IO.Path]::Combine($env:URASANDESU_PRIG_PACKAGE_FOLDER, 'tools\Urasandesu.Prig')) Disable-PrigTestAdapter "; var mci = new ManagementCommandInfo(command); mci.CommandExecuting += () => vm.ReportProcessingProjectWideProcessProgress(50u, null); mci.CommandExecuted += () => vm.EndCompletedProjectWideProcessProgress(null); ManagementCommandExecutor.Execute(mci); return(true); }
void RemovePrigAssemblyCore(PrigViewModel vm, string deletionalInclude) { vm.BeginProjectWideProcessProgress(ProjectWideProcesses.PrigAssemblyRemoving); var machinePreq = new MachinePrerequisite(Resources.NuGetRootPackageVersion); machinePreq.ProfilerStatusChecking += profLoc => vm.ReportProfilerStatusCheckingProgress(13u, profLoc); if (!MachineWideInstaller.HasBeenInstalled(machinePreq)) { vm.ShowSkippedProjectWideProcessMessage(SkippedReasons.NotRegisteredYet, deletionalInclude); vm.EndSkippedProjectWideProcessProgress(SkippedReasons.NotRegisteredYet, deletionalInclude); return; } if (!vm.ConfirmRemovingPrigAssembly(deletionalInclude)) { return; } var proj = MonitoringSelectionService.GetCurrentProject(); var pwPkg = new ProjectWidePackage(Resources.NuGetRootPackageId, Resources.NuGetRootPackageVersion, proj); pwPkg.PackagePreparing += () => vm.ReportPackagePreparingProgress(25u); pwPkg.PackageInstalling += metadata => vm.ReportPackageInstallingProgress(50u, metadata); pwPkg.PackageInstalled += metadata => vm.ReportPackageInstalledProgress(50u, metadata); pwPkg.PackageReferenceAdded += metadata => vm.ReportPackageReferenceAddedProgress(50u, metadata); ProjectWideInstaller.Install(pwPkg); var command = string.Format( @" Import-Module ([IO.Path]::Combine($env:URASANDESU_PRIG_PACKAGE_FOLDER, 'tools\Urasandesu.Prig')) Start-PrigSetup -DeletionalInclude {0} -Project $Project ", deletionalInclude); var mci = new ManagementCommandInfo(command, proj); mci.CommandExecuting += () => vm.ReportProcessingProjectWideProcessProgress(75u, deletionalInclude); mci.CommandExecuted += () => { vm.ShowCompletedProjectWideProcessMessage(deletionalInclude); vm.EndCompletedProjectWideProcessProgress(deletionalInclude); }; ManagementCommandExecutor.Execute(mci); }
void RemovePrigAssemblyCore(PrigViewModel vm, string deletionalInclude) { vm.BeginProjectWideProcessProgress(ProjectWideProcesses.PrigAssemblyRemoving); var machinePreq = new MachinePrerequisite(Resources.NuGetRootPackageVersion); machinePreq.ProfilerStatusChecking += profLoc => vm.ReportProfilerStatusCheckingProgress(13u, profLoc); if (!MachineWideInstaller.HasBeenInstalled(machinePreq)) { vm.ShowSkippedProjectWideProcessMessage(SkippedReasons.NotRegisteredYet, deletionalInclude); vm.EndSkippedProjectWideProcessProgress(SkippedReasons.NotRegisteredYet, deletionalInclude); return; } if (!vm.ConfirmRemovingPrigAssembly(deletionalInclude)) return; var proj = MonitoringSelectionService.GetCurrentProject(); var pwPkg = new ProjectWidePackage(Resources.NuGetRootPackageId, Resources.NuGetRootPackageVersion, proj); pwPkg.PackagePreparing += () => vm.ReportPackagePreparingProgress(25u); pwPkg.PackageInstalling += metadata => vm.ReportPackageInstallingProgress(50u, metadata); pwPkg.PackageInstalled += metadata => vm.ReportPackageInstalledProgress(50u, metadata); pwPkg.PackageReferenceAdded += metadata => vm.ReportPackageReferenceAddedProgress(50u, metadata); ProjectWideInstaller.Install(pwPkg); var command = string.Format( @" Import-Module ([IO.Path]::Combine($env:URASANDESU_PRIG_PACKAGE_FOLDER, 'tools\Urasandesu.Prig')) Start-PrigSetup -DeletionalInclude {0} -Project $Project ", deletionalInclude); var mci = new ManagementCommandInfo(command, proj); mci.CommandExecuting += () => vm.ReportProcessingProjectWideProcessProgress(75u, deletionalInclude); mci.CommandExecuted += () => { vm.ShowCompletedProjectWideProcessMessage(deletionalInclude); vm.EndCompletedProjectWideProcessProgress(deletionalInclude); }; ManagementCommandExecutor.Execute(mci); }
bool EnableTestAdapterCore(PrigViewModel vm) { vm.BeginProjectWideProcessProgress(ProjectWideProcesses.TestAdapterEnabling); var machinePreq = new MachinePrerequisite(Resources.NuGetRootPackageVersion); machinePreq.ProfilerStatusChecking += profLoc => vm.ReportProfilerStatusCheckingProgress(25u, profLoc); if (!MachineWideInstaller.HasBeenInstalled(machinePreq)) { vm.ShowSkippedProjectWideProcessMessage(SkippedReasons.NotRegisteredYet, null); vm.EndSkippedProjectWideProcessProgress(SkippedReasons.NotRegisteredYet, null); return false; } var proj = vm.GetCurrentProjectOrException(); var command = @" Import-Module ([IO.Path]::Combine($env:URASANDESU_PRIG_PACKAGE_FOLDER, 'tools\Urasandesu.Prig')) Enable-PrigTestAdapter -Project $Project "; var mci = new ManagementCommandInfo(command, proj); mci.CommandExecuting += () => vm.ReportProcessingProjectWideProcessProgress(50u, proj.Name); mci.CommandExecuted += () => vm.EndCompletedProjectWideProcessProgress(proj.Name); ManagementCommandExecutor.Execute(mci); return true; }