Ignore:
Timestamp:
02/23/21 16:36:44 (8 weeks ago)
Author:
dpiringe
Message:

#3026

  • removed property ConvertableType from all converters
  • removed the option to fixate or loosen the path of JsonItems (obsolete)
  • added a abstract formatter SymbolicRegressionSolutionFormatterBase as base formatter for ISymbolicRegressionSolution
  • unified the construction of exporter controls
  • code cleanup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeValueConverter.cs

    r17828 r17843  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    5 using System.Threading.Tasks;
    62using HeuristicLab.Core;
    73using HeuristicLab.Data;
     
    117  public class IntValueConverter : BaseConverter {
    128    public override int Priority => 1;
    13     public override Type ConvertableType => typeof(IntValue);
    149
    1510    public override bool CanConvertType(Type t) =>
    16       ConvertableType.IsAssignableFrom(t);
     11      typeof(IntValue).IsAssignableFrom(t);
    1712
    1813    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) =>
     
    3126  public class DoubleValueConverter : BaseConverter {
    3227    public override int Priority => 1;
    33     public override Type ConvertableType => typeof(DoubleValue);
    3428
    3529    public override bool CanConvertType(Type t) =>
    36       ConvertableType.IsAssignableFrom(t);
     30      typeof(DoubleValue).IsAssignableFrom(t);
    3731
    3832    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) =>
     
    5145  public class PercentValueConverter : BaseConverter {
    5246    public override int Priority => 2;
    53     public override Type ConvertableType => typeof(PercentValue);
    5447
    5548    public override bool CanConvertType(Type t) =>
    56       ConvertableType.IsAssignableFrom(t);
     49      typeof(PercentValue).IsAssignableFrom(t);
    5750
    5851    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) =>
     
    7164  public class BoolValueConverter : BaseConverter {
    7265    public override int Priority => 1;
    73     public override Type ConvertableType => typeof(BoolValue);
    7466
    7567    public override bool CanConvertType(Type t) =>
    76       ConvertableType.IsAssignableFrom(t);
     68      typeof(BoolValue).IsAssignableFrom(t);
    7769
    7870    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) =>
     
    8981  public class DateTimeValueConverter : BaseConverter {
    9082    public override int Priority => 1;
    91     public override Type ConvertableType => typeof(DateTimeValue);
    9283
    9384    public override bool CanConvertType(Type t) =>
    94       ConvertableType.IsAssignableFrom(t);
     85      typeof(DateTimeValue).IsAssignableFrom(t);
    9586
    9687    public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) =>
Note: See TracChangeset for help on using the changeset viewer.