Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 17843 was 17843, checked in by dpiringe, 3 years 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
RevLine 
[17828]1using System.Linq;
[17410]2
3namespace HeuristicLab.JsonInterface.OptimizerIntegration {
[17828]4  public class StringValueVM : ConcreteRestrictedJsonItemVM<StringJsonItem, string, string> {
5    protected override string GetDefaultValue() => Range.FirstOrDefault();
[17843]6    protected override bool RangeContainsValue() => Range.Contains(Item.Value);
[17519]7  }
[17473]8
[17828]9  public class StringArrayVM : ConcreteRestrictedJsonItemVM<StringArrayJsonItem, string, string[]> {
10    protected override string[] GetDefaultValue() => Range.ToArray();
[17843]11    protected override bool RangeContainsValue() => Item.Value.All(x => Range.Any(y => x == y));
[17410]12  }
13}
Note: See TracBrowser for help on using the repository browser.