Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/ResultJsonItem.cs @ 17834

Last change on this file since 17834 was 17834, checked in by dpiringe, 3 years ago

#3026

  • added ResultFormatter to add an extra layer of result transformation logic (converting a result value to a string with a defined logic, e.g. MatlabResultFormatter for ISymbolicRegressionSolution)
  • extended the IResultJsonItem with two properties for result formatting
  • added a new control to selected a result formatter for a result value
  • refactored the Runner for the new result formatting process
File size: 602 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using Newtonsoft.Json.Linq;
5
6namespace HeuristicLab.JsonInterface {
7  public class ResultJsonItem : JsonItem, IResultJsonItem {
8    public string ResultFormatterType { get; set; }
9
10    public Type ValueType { get; set; }
11
12    protected override ValidationResult Validate() => ValidationResult.Successful();
13
14    public override void SetJObject(JObject jObject) {
15      base.SetJObject(jObject);
16      ResultFormatterType = (jObject[nameof(IResultJsonItem.ResultFormatterType)]?.ToObject<string>());
17    }
18
19  }
20}
Note: See TracBrowser for help on using the repository browser.