- Timestamp:
- 08/03/21 10:53:47 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/AlgorithmConverter.cs
r17843 r18039 28 28 IAlgorithm algorithm = value as IAlgorithm; 29 29 foreach (var res in algorithm.Results) { 30 item.AddChildren(root.Extract(res, root)); 31 /* 32 item.AddChildren(new ResultJsonItem() { 33 Name = res.Name, 34 Description = res.Description 35 });*/ 30 var resultItem = root.Extract(res, root); 31 // fetch all result parameter items 32 var resultParameterItems = 33 item.Where(x => x 34 .GetType() 35 .GetInterfaces() 36 .Any(y => y == typeof(IResultJsonItem))); 37 // check for duplicates (to prevent double result items, 38 // which can occur with result parameters) 39 if(!resultParameterItems.Any(x => x.Name == resultItem.Name)) 40 item.AddChildren(resultItem); 36 41 } 37 42 item.AddChildren(root.Extract(algorithm.Problem, root));
Note: See TracChangeset
for help on using the changeset viewer.