private async Task TestExecutionStartingAsync(IOperation operation) { cancelling = false; runningInParallel = false; StopCoverage(); var settings = appOptionsProvider.Get(); if (!settings.Enabled) { CombinedLog("Coverage not collected as FCC disabled."); reportGeneratorUtil.EndOfCoverageRun(); return; } msCodeCoverageCollectionStatus = await msCodeCoverageRunSettingsService.IsCollectingAsync(testOperationFactory.Create(operation)); if (msCodeCoverageCollectionStatus == MsCodeCoverageCollectionStatus.NotCollecting) { if (settings.RunInParallel) { runningInParallel = true; fccEngine.ReloadCoverage(() => { return(testOperationFactory.Create(operation).GetCoverageProjectsAsync()); }); } else { CombinedLog("Coverage collected when tests finish. RunInParallel option true for immediate"); } } }
private Task InitializeIsCollectingAsync(ITestOperation testOperation) { collectionStatus = MsCodeCoverageCollectionStatus.NotCollecting; runMsCodeCoverage = appOptionsProvider.Get().RunMsCodeCoverage; useMsCodeCoverage = runMsCodeCoverage == RunMsCodeCoverage.Yes; userRunSettingsProjectDetailsLookup = null; return(CleanUpAsync(testOperation)); }
public async Task <IAppOptions> GetSettingsAsync(ICoverageProject coverageProject) { var projectDirectory = Path.GetDirectoryName(coverageProject.ProjectFile); var settingsFilesElements = fccSettingsFilesProvider.Provide(projectDirectory); var projectSettingsElement = await coverageProjectSettingsProvider.ProvideAsync(coverageProject); return(settingsMerger.Merge(appOptionsProvider.Get(), settingsFilesElements, projectSettingsElement)); }
public CoverageLineMarkTaggerProvider( IEventAggregator eventAggregator, IAppOptionsProvider appOptionsProvider ) : base(eventAggregator) { var appOptions = appOptionsProvider.Get(); coverageMarginOptions = CoverageMarginOptions.Create(appOptions); appOptionsProvider.OptionsChanged += AppOptionsProvider_OptionsChanged; }
private void TestExecutionStarting(IOperation operation) { fccEngine.StopCoverage(); var settings = appOptionsProvider.Get(); if (!settings.Enabled) { return; } if (settings.RunInParallel) { fccEngine.ReloadCoverage(() => { var testOperation = testOperationFactory.Create(operation); return(testOperation.GetCoverageProjectsAsync()); }); } }
public string Provide(Func <string> solutionFolderProvider) { var appOptions = appOptionsProvider.Get(); if (!String.IsNullOrEmpty(appOptions.FCCSolutionOutputDirectoryName)) { var solutionFolder = solutionFolderProvider(); if (solutionFolder != null) { return(Path.Combine(solutionFolder, appOptions.FCCSolutionOutputDirectoryName)); } } return(null); }
public CoverageColorProvider( [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, IAppOptionsProvider appOptionsProvider, ILogger logger ) { lazyIVsFontAndColorStorage = new AsyncLazy <IVsFontAndColorStorage>(async() => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); return((IVsFontAndColorStorage)serviceProvider.GetService(typeof(IVsFontAndColorStorage))); }, ThreadHelper.JoinableTaskFactory); coverageColoursFromFontsAndColours = appOptionsProvider.Get().CoverageColoursFromFontsAndColours; appOptionsProvider.OptionsChanged += AppOptionsProvider_OptionsChanged; this.logger = logger; DetermineColors(); }
private string GetAppDataFolder() { var dir = appOptionsProvider.Get().ToolsDirectory; return(Directory.Exists(dir) ? dir : Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)); }