- Timestamp:
- 07/20/21 17:39:48 (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.App/Runner.cs
r17834 r18026 5 5 using System.Threading; 6 6 using System.Threading.Tasks; 7 using HeuristicLab.Core; 7 8 using HeuristicLab.Optimization; 8 9 using Newtonsoft.Json.Linq; … … 53 54 54 55 // zip and filter the results with the ResultJsonItems 55 var filteredResults = configuredResultItems.Zip( 56 run.Results.Where(x => configuredResultItems.Any(y => y.Name == x.Key)), 57 (x, y) => new { Item = x, Value = y.Value }); 56 var filteredResults = new List<Tuple<IResultJsonItem, IItem>>(); 57 foreach(var resultItem in configuredResultItems) { 58 foreach(var result in run.Results) { 59 if(resultItem.Name == result.Key) { 60 filteredResults.Add(Tuple.Create(resultItem, result.Value)); 61 } 62 } 63 } 58 64 59 65 // add results to the JObject 60 66 foreach(var result in filteredResults) { 61 var formatter = GetResultFormatter(result.Item .ResultFormatterType);62 obj.Add(result.Item .Name, formatter.Format(result.Value));67 var formatter = GetResultFormatter(result.Item1.ResultFormatterType); 68 obj.Add(result.Item1.Name, formatter.Format(result.Item2)); 63 69 } 64 70 }
Note: See TracChangeset
for help on using the changeset viewer.