Changeset 17843 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/StringValueVM.cs
- Timestamp:
- 02/23/21 16:36:44 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface.OptimizerIntegration/ViewModels/StringValueVM.cs
r17828 r17843 2 2 3 3 namespace HeuristicLab.JsonInterface.OptimizerIntegration { 4 5 4 public class StringValueVM : ConcreteRestrictedJsonItemVM<StringJsonItem, string, string> { 6 5 protected override string GetDefaultValue() => Range.FirstOrDefault(); 7 8 protected override bool RangeContainsValue() => Range.Contains(Value); 6 protected override bool RangeContainsValue() => Range.Contains(Item.Value); 9 7 } 10 8 11 9 public class StringArrayVM : ConcreteRestrictedJsonItemVM<StringArrayJsonItem, string, string[]> { 12 10 protected override string[] GetDefaultValue() => Range.ToArray(); 13 14 protected override bool RangeContainsValue() => Value.All(x => Range.Any(y => x == y)); 11 protected override bool RangeContainsValue() => Item.Value.All(x => Range.Any(y => x == y)); 15 12 } 16 13 }
Note: See TracChangeset
for help on using the changeset viewer.