protected override bool TryGetBinaryReportFile(AnalysisConfig config, TeamBuildSettings settings, ILogger logger, out string binaryFilePath) { IEnumerable<string> urls = this.urlProvider.GetCodeCoverageReportUrls(config.GetTfsUri(), config.GetBuildUri(), logger); Debug.Assert(urls != null, "Not expecting the returned list of urls to be null"); bool continueProcessing = true; binaryFilePath = null; switch (urls.Count()) { case 0: logger.LogInfo(Resources.PROC_DIAG_NoCodeCoverageReportsFound); break; case 1: string url = urls.First(); string targetFileName = Path.Combine(config.SonarOutputDir, DownloadFileName); bool result = this.downloader.DownloadReport(config.GetTfsUri(), url, targetFileName, logger); if (result) { binaryFilePath = targetFileName; } else { continueProcessing = false; logger.LogError(Resources.PROC_ERROR_FailedToDownloadReport); } break; default: // More than one continueProcessing = false; logger.LogError(Resources.PROC_ERROR_MultipleCodeCoverageReportsFound); break; } return continueProcessing; }