コード例 #1
0
        public CoverageResult CollectResultAndReset()
        {
            if (!LoadRuntimeConfig())
            {
                return(new CoverageResult(_map, Array.Empty <int[]>()));
            }
            CoverageResult result = null;

            foreach (var process in _currentRuntimeConfig.Processes)
            {
                _logger.LogInformation($"Collecting coverage result from process {process.ID} on port {process.ListeningPort}");
                var procResult = RecordingControllerClient.CollectResultAndReset(_host, process.ListeningPort, _map);
                if (result == null)
                {
                    result = procResult;
                }
                else
                {
                    result = result.MergeWith(procResult);
                }
            }
            return(result);
        }