source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/StringValueVM.cs @ 17843

Last change on this file since 17843 was 17843, checked in by dpiringe, 7 weeks ago

#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 size: 624 bytes
Line 
1using System.Linq;
2
3namespace HeuristicLab.JsonInterface.OptimizerIntegration {
4  public class StringValueVM : ConcreteRestrictedJsonItemVM<StringJsonItem, string, string> {
5    protected override string GetDefaultValue() => Range.FirstOrDefault();
6    protected override bool RangeContainsValue() => Range.Contains(Item.Value);
7  }
8
9  public class StringArrayVM : ConcreteRestrictedJsonItemVM<StringArrayJsonItem, string, string[]> {
10    protected override string[] GetDefaultValue() => Range.ToArray();
11    protected override bool RangeContainsValue() => Item.Value.All(x => Range.Any(y => x == y));
12  }
13}
Note: See TracBrowser for help on using the repository browser.