internal Dictionary <string, string> GetProperties(ICakeEnvironment environment) { if (environment == null) { throw new ArgumentNullException(nameof(environment)); } var properties = new Dictionary <string, string>(); if (TestRunner.HasValue) { properties.Add("type", TestRunner.Value.ToString()); } if (MergeTestResults.HasValue) { properties.Add("mergeResults", MergeTestResults.ToString().ToLowerInvariant()); } if (!string.IsNullOrWhiteSpace(Platform)) { properties.Add("platform", Platform); } if (!string.IsNullOrWhiteSpace(Configuration)) { properties.Add("config", Configuration); } if (!string.IsNullOrWhiteSpace(TestRunTitle)) { properties.Add("runTitle", $"'{TestRunTitle}'"); } if (PublishRunAttachments.HasValue) { properties.Add("publishRunAttachments", PublishRunAttachments.ToString().ToLowerInvariant()); } if (TestResultsFiles != null && TestResultsFiles.Any()) { properties.Add("resultFiles", string.Join(",", TestResultsFiles.Select(filePath => filePath .MakeAbsolute(environment) .FullPath .Replace(filePath.Separator, System.IO.Path.DirectorySeparatorChar)))); } return(properties); }
static async Task <int> Main(string[] args) { ServicePointManager.DefaultConnectionLimit = 64; ThreadPool.SetMinThreads(workerThreads: 64, completionPortThreads: 4); var rootCommand = new RootCommand(); rootCommand.Add(DownloadAllVersions.GetCommand()); rootCommand.Add(DownloadPackage.GetCommand()); rootCommand.Add(Push.GetCommand()); rootCommand.Add(ParseRestoreLogs.GetCommand()); rootCommand.Add(ReplayRequestGraph.GetCommand()); rootCommand.Add(ConvertGraph.GetCommand()); rootCommand.Add(MergeTestResults.GetCommand()); rootCommand.Add(DumpRequestDurations.GetCommand()); return(await rootCommand.InvokeAsync(args)); }